Archive: Modern UI custom page and pre functions


Modern UI custom page and pre functions
I use to have just one custom page. When I tried to add another and also add pre functions to both, I got an already defined error on the pre. I commented out one of my shortcut pre's and then the error moved to the directory pre. Does modern UI only allow one pre function to be defined?

; Create Shortcuts
!define MUI_PAGE_CUSTOMFUNCTION_PRE ShortcutsPre
Page custom CustomPageCREATESHORTCUTS

;!define MUI_PAGE_CUSTOMFUNCTION_PRE ShortcutOn7Pre
Page custom CustomPageCREATESHORTCUTSOn7

; Directory page
!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPre
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
!insertmacro MUI_PAGE_DIRECTORY


You should not use a MUI pre function for a non-MUI page.

Also, you don't need a prefunction for a custom page in the first place. You can you do whatever you want in the actual page function.


Originally posted by MSG
You should not use a MUI pre function for a non-MUI page.

Also, you don't need a prefunction for a custom page in the first place. You can you do whatever you want in the actual page function.
Thanks MSG, I have this working now. I completely spaced on the fact that I was using a regular custom page rather than a MUI page.:)