I'm trying to create a custom page via nsDialog, with radio buttons that then affect a section further on. The issue I have is that the values do not seem to propagate beyond the CustomPage
funtion, seen in the example below:
Var RADIO_APPLE
Var RADIO_BANANA
Function CustomPage
nsDialogs::Create 1018
${NSD_CreateRadioButton} 0 0 100% 10u "Apple"
Pop $RADIO_APPLE
${NSD_CreateRadioButton} 0 20 100% 10u "Banana"
Pop $RADIO_BANANA
${NSD_Check} $RADIO_APPLE
nsDialogs::Show
${NSD_GetState} $RADIO_APPLE $0
${NSD_GetState} $RADIO_BANANA $1
MessageBox MB_OK "Apple $0 Banana $1"
FunctionEnd
Section "-CustomSection"
${NSD_GetState} $RADIO_APPLE $0
${NSD_GetState} $RADIO_BANANA $1
MessageBox MB_OK "Apple $0 Banana $1"
SectionEnd
This is obviously a gist, ignoring the includes and other pages, but when I build the full version of this I see
Apple 1 Banana 0
on the message box raised inside CustomPage
, but see
Apple 0 Banana 0
when the section is run.
I've read through https://nsis.sourceforge.io/NsDialogs_FAQ#How_to_easily_handle_radiobutton_selections and this solution gives me the same outcome.
Is there something I'm missing to make $RADIO_*
available in the section?
Thanks