Modal dialog doesn't close on [OK]

Got a problem you cannot solve? Try here.
Post Reply
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Modal dialog doesn't close on [OK]

Post by Bjarne »

I have a modal dialog with an OK button on it which Action is set to 'Return from Dialog'.
When clicking on the button the dialog is expected to close immediately but it doesn't.

In fact it seems the dialog waits until the next dialog in the sequence is shown.
In my particular case I have some script that needs to be executed between the dialogs so it cannot be shown immediately.

The correct behaviour would be to close the modal dialog, and show the next dialog after a few seconds when the intermediate code has finished executing.

The result is frustrating customers which frenetically clicks on the button believing the installer has hanged.

I've tried to set the dialog Action to 'Go to Next Dialog' but it behaves the same..

Running IA 2012.
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Modal dialog doesn't close on [OK]

Post by bokkie »

Bjarne,

Have a look at the Hide Dialog statement. Does that help?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Modal dialog doesn't close on [OK]

Post by FrancescoT »

That's correct Peter

Thank you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Modal dialog doesn't close on [OK]

Post by Bjarne »

Ouch! That easy eh? Will give it a whack first thing tomorrow morning and let you know :mrgreen:
Bjarne
Posts: 100
Joined: Mon Apr 07, 2008 2:38 am
Contact:

Re: Modal dialog doesn't close on [OK]

Post by Bjarne »

Unfortunately this doesn't work. 'Hide Dialog' only hides non-modal dialogs and mine is a modal one (letting the user select an option before continuing).

Just for testing I inserted a messagebox after the dialog is expected to close, see attached image.
The image shows both the dialog and the messagebox. Note that the messagebox also shows the dialogresult (the pressed button in this case).
Surely the dialog must be considered out of scope and should have been closed when the messagebox is shown?
Modal Dialog
Modal Dialog
IA_ModalDialog.png (31.71 KiB) Viewed 6105 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Modal dialog doesn't close on [OK]

Post by FrancescoT »

Dear Bjarne,

why do you not use a similar behaviour in your script?

As example: After the welcome dialog, I used a progress dialog (non-Modal) that update the status for supposed actions. When completed I used a dialog box and then the script flow continues.
Label: Welcome Dialog
Display Dialog: welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end

Comment: Display a progress dialog as non-Modal
Display Dialog: progress, use as progress dialog (non-modal)
Comment: Execute some action
MessageBox: Debug, Test
Hide Dialog
Of course you could use a customized progress dialog to proper display your actions.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply