!insertmacro radiobuttons makes some buggy behavior...
for example when i use a subsection i have to use something like this or all sections are enabled when subsection is checked.
Function .onselchange
!insertmacro SectionFlagIsSet ${EX} ${SF_SELECTED} selectedEX noEX
selectedEX:
!insertmacro UnselectSection ${EX1}
!insertmacro UnselectSection ${EX2}
!insertmacro UnselectSection ${EX3}
!insertmacro UnselectSection ${EX4}
!insertmacro UnselectSection ${EX5}
!insertmacro UnselectSection ${EX6}
!insertmacro UnselectSection ${EX7}
noEX:
FunctionEnd
then if i want to add radio button function to those sectiones with...
Function .onselchange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${EX1}
!insertmacro RadioButton ${EX2}
!insertmacro RadioButton ${EX3}
!insertmacro RadioButton ${EX4}
!insertmacro RadioButton ${EX5}
!insertmacro RadioButton ${EX6}
!insertmacro RadioButton ${EX7}
!insertmacro EndRadioButtons
!insertmacro SectionFlagIsSet ${EX} ${SF_SELECTED} selectedEX noEX
selectedEX:
!insertmacro UnselectSection ${EX1}
!insertmacro UnselectSection ${EX2}
!insertmacro UnselectSection ${EX3}
!insertmacro UnselectSection ${EX4}
!insertmacro UnselectSection ${EX5}
!insertmacro UnselectSection ${EX6}
!insertmacro UnselectSection ${EX7}
noEX:
FunctionEnd
it appears to work unless the subsection is checked again for some reason..the the radiobuttons have very strange behavior,seemingly ramdom section selection etc.is there a better way to do this?
!insert macro radiobuttons
10 posts
posting a simple example..is there a way to control the sections that are selected in a subsection...the radio buttons are'nt working well for me,whats wrong?
nvm got it working finally.
who can modify the test.nis to make one example "must" and "only" be selected.
thanks very much!
thanks very much!
I am having some wierd behaviour also.
I only have three sections. When I use the following code:
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${SEC01}
!insertmacro RadioButton ${SEC02}
!insertmacro RadioButton ${SEC03}
!insertmacro EndRadioButtons
FunctionEnd
It kind of works right.
What happens is this. When the components page is first appears, the first section is checked. I click on section 2 and it is checked (section one, however, remains checked also). I click on section three and it is checked (section two gets unchecked but section one still remains checked).
If I select and then deselect any section then everything begins to function normally.
This is not good because this introduces the possiblity that someone might have two sections checked. What am I missing?
Thanks again.
I only have three sections. When I use the following code:
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${SEC01}
!insertmacro RadioButton ${SEC02}
!insertmacro RadioButton ${SEC03}
!insertmacro EndRadioButtons
FunctionEnd
It kind of works right.
What happens is this. When the components page is first appears, the first section is checked. I click on section 2 and it is checked (section one, however, remains checked also). I click on section three and it is checked (section two gets unchecked but section one still remains checked).
If I select and then deselect any section then everything begins to function normally.
This is not good because this introduces the possiblity that someone might have two sections checked. What am I missing?
Thanks again.
Seems like you forgot to initialize $1.
I did, in the oninit function I call
StrCpy $1 ${SEC01}
Shouldn't that work. It worked fine until I added the third section.
StrCpy $1 ${SEC01}
Shouldn't that work. It worked fine until I added the third section.
Then ${SEC01} must not be defined in .onInit. It'll be easier to debug with the complete script...
I moved the initialation to onguiinit function and it started working again. Thanks for the help in the right direction. It was strange, it was working fine the other way under windows 98 but not under NT.
By the way I would have responded earlier but I couldn't get into the forums all afternoon yesterday. It seems the site was down.
By the way I would have responded earlier but I couldn't get into the forums all afternoon yesterday. It seems the site was down.
This is a better way to do the radio button
Function .onselchange
!insertmacro StartRadioButtons $1
${For} $R1 1 6
!insertmacro RadioButton $R1
${Next}
!insertmacro EndRadioButtons
${If} ${SectionIsSelected} ${EX}
${For} $R1 1 6
!insertmacro UnselectSection $R1
${Next}
${EndIf}
Functionend
no comment
Function .onselchange
!insertmacro StartRadioButtons $1
${For} $R1 1 6
!insertmacro RadioButton $R1
${Next}
!insertmacro EndRadioButtons
${If} ${SectionIsSelected} ${EX}
${For} $R1 1 6
!insertmacro UnselectSection $R1
${Next}
${EndIf}
Functionend
no comment