Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   SectionFlagIsSet question (http://forums.winamp.com/showthread.php?t=251110)

pixelfafa 14th July 2006 18:00

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.

code:

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:
code:

!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

Afrow UK 14th July 2006 18:11

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

pixelfafa 14th July 2006 18:40

Hey Afrow,

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

Thanks,
- Pixelfafa

Afrow UK 14th July 2006 19:04

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

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

-Stu


All times are GMT. The time now is 05:56.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.