|
|
#1 |
|
Junior Member
Join Date: Sep 2007
Posts: 3
|
Cancel button of custom page malfunction
Hi,
I have a cutom page using the CANCEL button to go to the next page, and using the NEXT button do some extra evaluations in the function before leave. The problem is that if the function before leave includes "Abort", the CANCEL button will not go next page, if not, it's fine. Following is the code, if you mask the Abort in the testPageLeave, the problem disappearred.Can anybody help me to solve this problem? Thanks! #------------------------------------------------ #test.nsi !include "MUI.nsh" !define MUI_CUSTOMFUNCTION_ABORT .myuserabort Function .onInit InitPluginsDir File /oname=$PLUGINSDIR\test.ini "test.ini" FunctionEnd !insertmacro MUI_PAGE_WELCOME Page custom testPageShow testPageLeave !insertmacro MUI_PAGE_FINISH !insertmacro MUI_LANGUAGE "English" OutFile "test.exe" Section "MainSection" SEC01 SectionEnd Function testPageShow Push $R0 InstallOptions::dialog "$PLUGINSDIR\test.ini" Pop $R0 Pop $R0 FunctionEnd Function testPageLeave Abort FunctionEnd Function .myuserabort SendMessage $HWNDPARENT "0x408" "1" "" Abort FunctionEnd #---------------- #test.ini [Settings] NumFields=1 [Field 1] Type=Label Text=test Left=10 Right=28 Top=20 Bottom=40 |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
NSIS processes the Cancel button and not InstallOptions. You can't use the Cancel button for anything else but aborting.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2007
Posts: 3
|
But if I jump 2 pages like:
SendMessage $HWNDPARENT "0x408" "2" "" in Function .myuserabort, it works. Or if I mask the "Abort" in Function testPageLeave, then the CANCEL button can go to the next page. Last edited by fifth8118; 5th September 2007 at 13:53. |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
The destruction process of the installer has already initialized once the Cancel button is pressed. Any problem that occurs after you force it to do something else can be caused by this.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|