PDA

View Full Version : Reusing Dialogs



sniffy96
01-31-2006, 11:00 AM
Hello:

I would like to know if it is possible to use an Installshield dialog more than once in a project file. So far, it does not appear that it is possible in the way that I want. Here's my problem: My installer needs to ask for a series of different passwords from the user. My dialog asks the user to enter the password, then re-enter the password for verification and then click next. If the two passwords match the Next button becomes enabled. However, it appears that the dialog designer isn't meant for such reuse? I can't seem to add properties to the dialog like I can when writing a custom Product Action. The logic/code is the same for the dialog, the only thing that is different are the Installshield variables that get updated and the prompt that is displayed to the user. Am I supposed to copy the dialog and create new classes, one for each dialog?

HeikoOtt
02-02-2006, 04:20 PM
Hi!

are you sure? I see no problem adding a defined dialog multiple times to the same or different sequence?

Heiko

Skycatcher
10-20-2007, 09:24 AM
I found that you can reuse a dialog if you set the Next button with a custom action that sets a property then check that property as a condition for proceeding to the next dialog.

For example, I have a custom Dialog to check an IP Address. I created a property in the Property table called IPValid and set it to 1. I have a custom action called VerifyIP set as a doAction event on the first row of my Next button behaviour. The second row is a NewDialog event to call my next dialog with its condition set to ValidIP = "1"

MY VerifyIP script sets the Session.Property("ValidIP") = "0" when at the beginning of the script and sets it to "1" when it reaches the end of the script if the IP is valid.