Back Button is not working in custom Dialog

Got a problem you cannot solve? Try here.
Roostar2004
Posts: 155
Joined: Mon Nov 12, 2007 11:59 am

Back Button is not working in custom Dialog

Postby Roostar2004 » Fri Nov 13, 2009 9:38 am

I have created a few custome dialogs and am having trouble getting the BACK button to work like it should. I have double checked and when clicking the back button it calls the "Previous Dialog" statement. I created two dialogs Database and ShortCut. No matter what I click either back or cancel it takes me to the next dialog. Below is the MSI code that I am using and again I have double checked that the action for the back button is set to "Goto Previous Dialog" and Cancel is set "Cancel Installation.

label: Start Menu
Display Dialog: startmenu, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
GoTo Label: Destination Directory
else
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
end

label: Database
if Variable MAINTENANCE not Equals True
Display Dialog: Database, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
GoTo Label: Start Menu
else
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
end
end

label: ShortCut
if Variable MAINTENANCE not Equals True
Display Dialog: ShortCut, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
GoTo Label: Database
else
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
end
end

I have seen several other posts concering this same issue without resolve. Is there anything that can be done about this.

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Postby sdeschenes » Fri Nov 13, 2009 12:27 pm

In the Display Dialog command, did you leave the "Return Result in Variable" blank? If so, make sure to set it to WIZARD. I was able to reproduce your problem by leaving it blank.

Roostar2004
Posts: 155
Joined: Mon Nov 12, 2007 11:59 am

Postby Roostar2004 » Fri Nov 13, 2009 3:04 pm

The buttons do not give me and option for where I woud like to return the variable. It is grayed out. Only thing I can select from is the action i would like to preform.

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Postby sdeschenes » Mon Nov 16, 2009 10:44 am

I am not talking about the buttons on the dialog. I am talking about the Display Dialog command in your code.

In the section of code for displaying the Database dialog, you have an if statement checking if the variable MAINTENANCE doesn't equal True. Therefore, if MAINTENANCE doesn't equal true, you display your dialog, Database. You can have the dialog set a variable to store the user's action of how they exited the dialog. And in your case, make sure the dialog returns the result in WIZARD.

Check the help file for displaying dialogs.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 77 guests