|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Small bug perhaps?
I've noticed that since SubSection was replaced with SectionGroup, SectionGroupEnd now takes up a section index slot.
For example, if I have... SectionGroup "Group" Section "Section 1" SectionEnd SectionGroupEnd ...the last index (while looping through them before the error flag is set) should be 1 (Section 1's index). However, it's always 2... If I put some more sections after the SectionGroup, their index's are 1 more than they should be. Is this a bug or is it by design (for what reason?) -Stu |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
It always took a section index slot. The section group end is marked using a section with the SF_SECGRPEND flag which used to be called SF_SUBSECEND.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That's interesting. I've never noticed it
![]() Is there an easy way to check if a SectionGroup check-box is checked? This problem (with the SectionGroupEnd taking up a slot) came up while I looped through all Sections in a SectionGroup to check if all were unselected, and I'd always find this odd one at the end which wasn't actually a Section (which broke the code). I ended up putting a dummy section in to mark the end of the Sections group, but that isn't a very nice method. Perhaps you could add a built-in SectionsCount define or something which refers to the highest section index. It's not a huge problem, but it might come in useful (I'd find it useful!) -Stu |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You don't need to put a dummy section at the end, that weird section is the dummy section.
To check if a section group is selected or not, you can check the flags on the section group itself. If it's partially selected, the SF_PSELECTED flag will be turned on. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Well that's the problem... whether or not the SectionGroup check-box is checked or not, I get $R0 as 0 when using:
SectionGetFlags ${PROG2} $R0 IntOp $R0 $R0 & ${SF_SELECTED} -Stu |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Attach an example script.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Sorry, it works now.
-Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|