nsDialogs checkbox lose its hadle
Hi
In the custom page I create check box (among other controls) and keep its handle
${NSD_CreateCheckBox} 0 $3 50% 6% "${RESTORE_DB_CHECKBOX_TEXT}"
Pop $checkBoxRestoreDB
;Set default
${NSD_SetState} $checkBoxRestoreDB ${BST_CHECKED}
${NSD_OnClick} $checkBoxRestoreDB DisplayOrHideAdminUserAndPass
In the Page leave function there is some logic which might Abort of the page leave and keep displaying the page.
Under some flows (depend of the user selections) the variable $checkBoxRestoreDB that holds the check box handle have another value - the name of installer single section
Renaming the section, and recompiling - and now the variable has the new section name.
Obviously I do not do it myself - setting this variable to hold the section name. as all I have changed is:
Section "Server Filess" SecServerFiles
it took some time to find a workaround which is even weirder
I just added a log print of the handle
If I still write the line without the handle - i have problem again
The LogPrint macro writes a line to the log file
!insertmacro LogPrint "ConnectAndCheckIfDataBaseExist 3: check box handle: $checkBoxRestoreDB"
!macro LogPrint msg
;Open log file for append
LogEx::Init "$LogFileName"
;Write log message
LogEx::Write true true "${msg}"
;Close
LogEx::Close
;write message to the Log file created by the NSIS special build (LogSet)
LogText "${msg}"
!macroend
This all thing looks very weird to me and I'm sure there is something here which I miss.
Anyone?
tx
Oren