PDA

View Full Version : Got that one fixed... documentation correction



torrid
01-29-2011, 11:47 AM
Friedrich,

Figured out that last one... I don't start with Set Variable but just with the Detect ACtive Application and then set the variable in there...

New item...your help documentation shows $IDCANCEL$ ... if I put that in the box it shows in code and throws error that its not defined. It must be entered without the $ signs.

On Detect ACtive Application page in help file it shows:

If %_SB_RETURN% Equals "$IDCANCEL$" Then

Exit Installation

End

It should be:

If %_SB_RETURN% Equals "IDCANCEL" Then

torrid
01-29-2011, 12:10 PM
ACtually using "IDCANCEL" compiles but does not work... cancel button never detected and endless loop never broken out of .... so I went back and change it to: $IDCANCEL$

and on compile I get:
Reference to constant $IDCANCEL$ has not been previously defined.

AM I supposed to add an include or something?

I am running SB 7.3.3195

linder
01-29-2011, 12:11 PM
Hello,

No, the documentation is 100% correct! $IDCANCEL$ (= 2) is defined in the "Common Definitions.sbi" file. I assume you are using the constant before you call that include script to define constants.

Your code is wrong now. IF resolves to true if the %_SB_RETURN% runtime variable is "IDCANCEL" (the complete string). I am sure that is not what you are trying to do here ;)

Hope this helps.

Friedrich

linder
01-29-2011, 12:12 PM
Yes :)

! --- Define commonly used constants ---
#include script "Common Definitions.sbi"

Does this help?

Friedrich

torrid
01-29-2011, 12:32 PM
I'm sorry... I figured it out... I had the detect active application code as the first thing in my script... even before the definitions include file..... thus $IDCANCEL$ was not defined at that point...

My bad....sorry about that.

linder
01-29-2011, 12:32 PM
Perfect :)

Friedrich