kookh
22nd August 2006 09:58 UTC
Problem with ButtonEvent Plugin
I have been using the ButtonEvent plugin for quite a while now, mostly to add buttons to the components page. However, when I tried to add a button to the parent dialog, everything worked ok except that the "Abort" statement didn't seem to do anything. It performed the code but then skipped to the next page disregarding the Abort statement. Is there something wrong from my end or is this a bug?
kookh
25th August 2006 09:08 UTC
anyone ?
Afrow UK
25th August 2006 11:11 UTC
If you have a button on the parent dialog, you need to call your button code in all Leave functions for all installer dialogs. The plugin example shows this.
-Stu
kookh
25th August 2006 23:08 UTC
Afrow UK, I did as you said and all the custom pages seem to be working fine but in the Components page, the Abort statement is still not being executed. The same thing is happening with your example file.
The button is loaded in the MUI_CUSTOMFUNCTION_GUIINIT function. Here's the code from the Leave function of the Components page:
ButtonEvent::WhichButtonID /NOUNLOAD
Pop $R1
${If} $R1 = 69
ExecShell open http://www.blah.com
Abort
${ElseIf} ...
Afrow UK
26th August 2006 11:33 UTC
Thanks, fixed.
http://nsis.sf.net/File:ButtonEvent.zip
-Stu
kookh
26th August 2006 12:05 UTC
Super. Thanks alot =)
Afrow UK
26th August 2006 12:17 UTC
Just make sure you disable the parent window button on the InstFiles page. I've added code to the example.
-Stu