Modal dialog doesn't close on [OK]

Got a problem you cannot solve? Try here.

Modal dialog doesn't close on [OK]

Postby Bjarne » Tue Apr 10, 2012 8:02 am

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.
Bjarne
 
Posts: 92
Joined: Mon Apr 07, 2008 2:38 am

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

Postby bokkie » Tue Apr 10, 2012 8:26 am

Bjarne,

Have a look at the Hide Dialog statement. Does that help?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware (9 through 15) MVP
bokkie
 
Posts: 605
Joined: Sun Feb 08, 2009 6:30 am

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

Postby FrancescoT » Tue Apr 10, 2012 9:50 am

That's correct Peter

Thank you.

Regards
Francesco Toscano
InstallAware Software Support

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
FrancescoT
Site Admin
 
Posts: 1836
Joined: Sun Aug 22, 2010 4:28 am

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

Postby Bjarne » Tue Apr 10, 2012 1:41 pm

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

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

Postby Bjarne » Tue Apr 10, 2012 11:26 pm

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?

IA_ModalDialog.png
Modal Dialog
IA_ModalDialog.png (31.71 KiB) Viewed 350 times
Bjarne
 
Posts: 92
Joined: Mon Apr 07, 2008 2:38 am

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

Postby FrancescoT » Wed Apr 11, 2012 9:45 am

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 Support

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
FrancescoT
Site Admin
 
Posts: 1836
Joined: Sun Aug 22, 2010 4:28 am


Return to Technical Support

Who is online

Users browsing this forum: dec, Google [Bot] and 4 guests