PDA

View Full Version : Custom dialog skipped - why ?



NewsArchive
09-07-2010, 01:23 AM
Strange behaviour :


set variable %OV_OVERLOPEN_INSTELLINGEN% to "1"

Define wizard dialog "OVERLOPEN" : this dialog has only a check box
referencing %OV_OVERLOPEN_INSTELLINGEN%
Several wizard dialogs
Define wizard dialog "EINDE"

Loop Wizard (Abort Dialog Ative)
If %SB_DIALOGID% Equals "$OVERLOPEN$" Then
IF %OV_OVERLOPEN_INSTELLINGEN% Equals "0" Then
Hide Wizard Dialog & names of the several dialogs to skip
End
End
End


When I run this , it works.
First dialog, checkbox is set, all dialogs are executed.
when the user unchecks the checkbox in the first dialog, the dialogs are
skipped and the last dialog is shown.

Everything perfect.

Now I change the initial value of the variable :
set variable %OV_OVERLOPEN_INSTELLINGEN% to "0"
So the default will be to skip all dialogs except the last one

When I run it, and don't touch the checkbox, dialogs are skipped. All ok.
When I run, and set the checkbox in the first dialog, other dialogs are skipped
as if I didn't set the checkbox.

So with default/initial value of 1 it works, with default/initial value of 0,
it doesn't work.

I don't find why.
What am I forgetting or doing wrong?

Thanks

Hans Vinckier

NewsArchive
09-07-2010, 01:23 AM
Hans,

> I don't find why.
> What am I forgetting or doing wrong?

As I understand it, you would like to do something when the "Next" button on
your custom dialog is pressed.

So it should be:

If %SB_DIALOGID% Equals "$OVERLOPEN$" Then
If %_SB_EVENTID% Equals "$EVENT:ONUPDATE$" Then
IF %OV_OVERLOPEN_INSTELLINGEN% Equals "0" Then
Hide Wizard Dialog & names of the several dialogs to skip
End
End
End

And don't forget to enable the dialogs again for the case the user presses
"Back" and then marks the checkbox. Similar to:

If %SB_DIALOGID% Equals "$OVERLOPEN$" Then
If %_SB_EVENTID% Equals "$EVENT:ONUPDATE$" Then
IF %OV_OVERLOPEN_INSTELLINGEN% Equals "0" Then
Hide Wizard Dialog & names of the several dialogs to skip
Else
Show Wizard Dialog & names of the several dialogs to skip
End
End
End

Hope this helps.

Friedrich

NewsArchive
09-07-2010, 01:24 AM
Thanks Friedrich,

The line with the %_SB_EVENTID% made the difference.
I had checked the forum and found you referred someone on 5/18 to examples 2 sb7.
I'd checked these and saw the use of this event but found no further explanation.
That's why I posted the question.
Thanks for the ulimate fast response.

Hans Vinckier

NewsArchive
09-07-2010, 01:25 AM
Hans,

> The line with the %_SB_EVENTID% made the difference.
> I had checked the forum and found you referred someone on 5/18 to examples
> 2 sb7. I'd checked these and saw the use of this event but found no
> further explanation.
> That's why I posted the question.
> Thanks for the ulimate fast response.

There is more than the examples ;-) "Learning SetupBuilder Part I" is the
official "Everything you ever wanted to know about SetupBuilder but were
afraid to ask" introductory material. This "SetupBuilder Bible" is a
compendium of tips, tricks, warnings, and resources for SetupBuilder users
of every ability level

http://www.lindersoft.com/forums/showthread.php?t=24376

We'll integrate (download and access) this "SetupBuilder Bible" into the
IDE in the next build.

Friedrich