Archive: PageEx behaviour...


PageEx behaviour...
Yet another problem... Something that made me think I do not understand the fundamentals of NSIS...

When I used "!insertmacro MUI_PAGE_DIRECTORY", everything worked well.

When substituted that statement with "PageEx directory ... PageExEnd", I lost my MUI_DIRECTORYPAGE_TEXT_TOP and MUI_DIRECTORYPAGE_TEXT_DESTINATION values.

So here is the new code (instead of "!insertmacro MUI_PAGE_DIRECTORY"):

PageEx directory
DirText "text" "subtext" "browse_button_text" "browse_dlg_text"
PageCallbacks dirPagePre dirPageShow dirPageLeave
PageExEnd


So where did my defines from English.nsh go? Where do I specify them now? I tried to add the following to my functions dirPagePre or dirPageShow:
1) !define MUI_DIRECTORYPAGE_TEXT_TOP "Text top"
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Text destination"
2) !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP "Text top"
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION "Text destination"

Neither works... The two fields at the top of the window remain blank... Even changing code in system.nsh makes no difference... What am I missing?


Sorry, what disappeared actually are MUI_TEXT_DIRECTORY_TITLE and MUI_TEXT_DIRECTORY_SUBTITLE values, and not those I mentioned above. So please disregard my description of how I tried to solve the problem. The question is simply where did the values for MUI_TEXT_DIRECTORY_TITLE and MUI_TEXT_DIRECTORY_SUBTITLE disappear and how do I declare them now?


Why are you using PageEx at all?

You use the following defines before inserting the MUI_PAGE_DIRECTORY macro...
MUI_PAGE_HEADER_TEXT
MUI_PAGE_HEADER_SUBTEXT
MUI_DIRECTORYPAGE_TEXT_TOP
MUI_DIRECTORYPAGE_TEXT_DESTINATION

And for setting up page functions, use these defines...
MUI_PAGE_CUSTOMFUNCTION_PRE
MUI_PAGE_CUSTOMFUNCTION_SHOW
MUI_PAGE_CUSTOMFUNCTION_LEAVE

-Stu


What you uggested is definitely a better method that what I used. Thanks. However, this does not answer my question. Where were the TITLE and SUBTITLE defines lost once I started using PageEx? How do I redefine them in this case? This could a bug, you know :-)...


The macros wrap both PageEx and the usage of the defines. You shouldn't be using PageEx or Page for non custom pages when using the MUI.