Archive: SectionFlagIsSet question


SectionFlagIsSet question
Hi all,

this one has me stumped, as I copied most of it straight out of the examples. I found a lot of other code going about it the same way but mine just doesn't work:

I have an options page that only needs to be shown when a section is NOT checked. Here is the section definition.


SectionGroup /e "Geoid Model Files"
Section "North American Geoid" SecNAGeoidModelFiles
SetOutPath "$INSTDIR"
File /r .\..\..\etc\geoidmodel
SectionEnd
SectionGroupEnd


To decide whether SecNAGeoidModelFiles is checked or not, I test with:

!insertmacro SectionFlagIsSet ${SecNAGeoidModelFiles} ${SF_SELECTED} 0 show


but this never jumps to show, regardless of the selection state. The test always comes out true, no matter what.

Any ideas?
Thanks
- pixelfafa

1. Make sure you're using the macro below the actual Section in your NSIS script.

2. It may not let you use 0 for the jump. Try a label.

-Stu


Hey Afrow,

moving it below the sections did the trick. Scary stuff...

Thanks,
- Pixelfafa


You should have had a warning from the compiler about this.

Something along the lines of "unknown constant SecNAGeoidModelFiles, ignoring"

-Stu