Old 8th January 2016, 19:34   #1
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
one section problem

Hi there

In 3.0b2, I have the following sections with checkboxes:
code:

SectionGroup /e !CMDS
SectionGroup /e MSVC
Section /o "2003" n2003
SectionEnd

Section /o "2005" n2005
SectionEnd

Section /o "2008" n2008
SectionEnd

Section /o "2010" n2010
SectionEnd

SectionGroupEnd

SectionGroup /e !MINGW
Section /o "TDM" tdm
SectionEnd

Section /o "Strawberry Perl" fresa
SectionEnd
SectionGroupEnd
SectionGroupEnd


And the macro stuff:
code:

Function .onInit
InitPluginsDir
!insertmacro MUI_LANGDLL_DISPLAY
StrCpy $1 ${n2010}
StrCpy $2 ${fresa}
FunctionEnd

Function .onSelChange

!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${n2003}
!insertmacro RadioButton ${n2005}
!insertmacro RadioButton ${n2008}
!insertmacro RadioButton ${n2010}
!insertmacro EndRadioButtons

!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${tdm}
!insertmacro RadioButton ${fresa}
!insertmacro EndRadioButtons

FunctionEnd


When I test the installer, correctly I can checked only one in group ${fresa}, but it force me to choose one:

1.- how can I give the option to unselect either the checkboxes?

Also, when I check ${CMDS} 2003, 2005 and 2008 are checked and in ${MINGW} is checked ${tdm} and not ${fresa} as expected...any ideas to help this old nsis user


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 8th January 2016, 20:22   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,012
Because radio buttons are supposed to force you to choose exactly one?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th January 2016, 21:56   #3
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
I know...I didn't find one macro for checkboxes...is there one?


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 8th January 2016, 22:00   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,012
Quote:
Originally Posted by Joel View Post
I know...I didn't find one macro for checkboxes...is there one?
No you have to code your own logic. In NSIS 3 the changed section id is in $0 in .onSelChange.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump