Works now...
Found a bug tought:
=========================
Take your Examples\ButtonEvent\ButtonEventNotify.nsi script.
Compile and Run
-> Click Next
-> Click I Agree
-> Click on your "I like cheese" button (it works).
-> click on Back
-> click on I Agree
-> Click on your "I like cheese" button (it doesn't work!).
I had this problem and thw workaround is to create a Pre function and unload the plugin. Funny part is if I try to unset the handler for ID 1200, it crashes...
Function Component_Pre
ButtonEvent::Unload
#ButtonEvent::UnsetEventHandler 1200
Strcpy $DefaultCheckBox "0"
Call DefaultCheckBox_Modification
FunctionEnd
Also, it would be good to put in a readme to not do the following:
Function Component_Leave
var /GLOBAL CheckBoxChanged
# If CheckboxDefault Event
ButtonEvent::WhichButtonId /NOUNLOAD
Pop $CheckBoxChanged
${If} $CheckBoxChanged == 1200
Call DefaultCheckBox_Modification
Abort
${Else}
# Unloading the ButtonEvent plugin here
# makes the installer crash!
ButtonEvent::Unload
${EndIf}
FunctionEnd