![]() |
#1 |
Junior Member
Join Date: Jul 2012
Posts: 22
|
Correct usage of $(AndIfNot)
I tried in vain this:
code: What I want is I want to exit a function if both section 2 and section 4 are unselected. But the above code doesnt compile saying there is an error in line 2 required 4 parameters, passed 3. How to do this logic correctly? |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
First of all, you cannot use abort to break out of a functioncall. You'll have to use a goto functionend instead.
Second, ${AndIfNot} ${SelectionIsSelected} ${Section4} is correct, assuming ${Section4} is defined. Do you get a warning about non-existing defines? But the error in "line 2" does not make sense. Did you mean in [i]macroline[i] 2? What is the exact error from the compiler? |
![]() |
![]() |
![]() |
#3 | |
Junior Member
Join Date: Jul 2012
Posts: 22
|
1. I got the Abort call from Show custom page when a section has been selected link. I am using it in the function to display my custom IO page (by writing Abort I am not displaying the page). And it is working too (like returning from a function, not actually aborting the installation itself). What is abort meant for then?
2. The error I am getting is below: Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You've written "SelectionIsSelected" instead of "SectionIsSelected".
Stu |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Jul 2012
Posts: 22
|
![]() |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,333
|
You can use Return, or if you want to set the abort flag you can use Abort...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
|
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Jul 2012
Posts: 22
|
See section 4.5.3 in the manual, Abort call can be used to not show a custom page..
|
![]() |
![]() |
![]() |
#9 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Err oops, sorry my bad. The 'quit' command doesn't work in nsDialogs callbacks (like onClick etc). Not sure about abort.
|
![]() |
![]() |
![]() |
#10 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yes calling Abort in the custom page show function has the same effect as not showing the page (thereby skipping it).
Edited my post ![]() Stu |
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
|
![]() |
![]() |
![]() |
|
Tags |
checkbox, logiclib, section, selected |
Thread Tools | Search this Thread |
Display Modes | |
|
|