ramon18
24th April 2003 19:38 UTC
SectionSetFlags Problem
Hi, I'm using NSIS v2.0b3, and I have the following problem:
I need to activate and deactivate one section, but after deactivating it, I can't reactivate it
------------------------------------
Section DataBaseSEC
...
SectionEnd
Function .onInit
SectionGetFlags ${DataBaseSEC} $0
IntOp $0 $0 & ${SECTION_OFF}
SectionSetFlags ${DataBaseSEC} $0
SectionGetFlags ${DataBaseSEC} $0
IntOp $0 $0 & ${SECTION_ON}
SectionSetFlags ${DataBaseSEC} $0 ; -> DataBaseSEC must be active, but not
EndFunction
Thanks
Ramon
Afrow UK
24th April 2003 19:53 UTC
I got anoyed with using the .onSecChange function and making up code to support different styles for the components page, so I made a custom IO page - which looks a lot nicer (I think anyway)
-Stu
Joost Verburg
24th April 2003 20:15 UTC
Include Sections.nsh and use the (Un)SelectSection macro's (or check the macro code).
ramon18
24th April 2003 20:28 UTC
Thanks for fast replay, it works now.
with this fix: http://forums.winamp.com/showthread....=SelectSection
Ramon
kichik
24th April 2003 21:46 UTC
Just for the record, you had two problems in your script. First, it's SF_SELECTED and not SECTION_ON. Second, you should have or'ed (| not &) SF_SELECTED. But the macros, with the fix, inside Sections.nsh are meant to hide all this.