PDA

View Full Version : DialogID and DialogNextID



NewsArchive
04-11-2009, 03:03 AM
Hi Friedrich,

if you go forward in a dialog loop, then "%_SB_DIALOGID%" contains the
last dialog number and "%_SB_DIALOGNEXTID%" contains the next one. So
far so good. But if you go backward, both variables contains "0". Why?

Thanks for your answer.

Markus

NewsArchive
04-11-2009, 03:03 AM
Hi Markus,

> if you go forward in a dialog loop, then "%_SB_DIALOGID%" contains
> the last dialog number and "%_SB_DIALOGNEXTID%" contains the next
> one. So far so good. But if you go backward, both variables
> contains "0". Why?

The variables contain "0" to make sure that actions for specific dialogs are
*not* executed if you press the "Back" button. Only the "Next" button
should execute commands.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-11-2009, 03:04 AM
And if I want to rollback some actions?


I can't count backward every time I found "0" in the variable, because
dialogs are enabled and disabled depending on different things.

Markus Zander

NewsArchive
04-11-2009, 03:04 AM
Hi Markus,

> And if I want to rollback some actions?
>
> I can't count backward every time I found "0" in the variable, because
> dialogs are enabled and disabled depending on different things.

You should never do anything in the "Wizard Loop" that needs a "rollback".
The Wizard Loop is there to prepare the real installation process. Only
execute actions when the "Next" button is pressed. This includes
enable/disable dialog actions.

Hope this helps.

Friedrich

NewsArchive
04-11-2009, 03:05 AM
It was a hypothetic question.

Thank you, Friedrich.

Markus Zander

NewsArchive
04-11-2009, 03:05 AM
>
> It was a hypothetic question.
>

And the question made sense! We'll add some more details to the manual.

Thanks,
Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-11-2009, 03:06 AM
Friedrich,

> You should never do anything in the "Wizard Loop" that needs a "rollback".
> The Wizard Loop is there to prepare the real installation process. Only
> execute actions when the "Next" button is pressed. This includes
> enable/disable dialog actions.

Programmatically there is no way to return to a previous dialog, only
if the user presses the "Back" button?

I can live with it either way but it does provide more flexibility.

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
04-11-2009, 03:06 AM
Hi Lee,

> Programmatically there is no way to return to a previous dialog, only
> if the user presses the "Back" button?
>
> I can live with it either way but it does provide more flexibility.

That's correct. You can't programmatically go back to a previous dialog.

Just curious, what type of scenario requires that you go back to a previous
dialog?

Friedrich

NewsArchive
04-11-2009, 03:06 AM
Friedrich,

> Just curious, what type of scenario requires that you go back to a previous
> dialog?

In that previous thing I used for installs<g> I used a dialog to
provide feedback about incorrect entries and then returned to the
offending dialog. This was used instead of a message box.

The implementation also allowed easy jumping of dialogs dependent on
logic and entries from dialog to dialog. I know I can do the same in
SB going forward using "Show/Hide Wizard Dialog" so going forward
isn't a problem. For the other I can use a message box and cycle.

As I said, I can live without it but it was handy. Maybe SB8?!<g>

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
04-11-2009, 03:07 AM
If there weren't some such situations, why would there be a Back button on
dialog screens <g> ?

Jane

NewsArchive
04-11-2009, 03:08 AM
> If there weren't some such situations, why would there be a Back button
> on dialog screens <g> ?

Those are for the USER to go back. Friedrich asked why would the SCRIPT
want to go back?

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
04-11-2009, 03:08 AM
> If there weren't some such situations, why would there be a Back button on
> dialog screens <g> ?

<G> To be honest, I have never ever seen Windows "wizard dialogs" that go
back "automatically" to previous dialogs (e.g. jump back from panel #5 to
#2). Data has to be validated when the user presses "Next".

Friedrich

NewsArchive
04-11-2009, 03:09 AM
Hi,

there IS a way to go programmatically go back. Not nice, but functional.
See the attached small demo project.

Markus

NewsArchive
04-11-2009, 03:09 AM
> there IS a way to go programmatically go back. Not nice, but functional.
> See the attached small demo project.

What a dirty hack <g>.

But again, I recommend to never programmatically override "the flow" of the
wizard dialogs.

Friedrich