cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
selwynreynolds
Level 7

WaitOnDialog returns -1

I've created a new dialog with EzDefineDialog("myname", ISUSER, "myname", NULL). When I call WaitOnDialog("myname") it returns -1. This is an InstallScript project in InstallShield 2008. Any ideas? :confused:
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

The help topic "Using InstallScript to Implement Custom Dialogs" has a bit more background information; is the dialog name in EzDefineDialog the same (including capitalization) as the name in the Dialogs view? Does EzDefineDialog return success even though WaitOnDialog doesn't?
0 Kudos
selwynreynolds
Level 7

I did verify the dialog name in the EzDefineDialog call is the same as the name in the Dialog views. And yes, EzDefineDialog does return success. Is there an option or setting that needs to be set somewhere? I imported a custom dialog from another InstallScript project that works in the original project but won't work in my current one. I get the same error on WaitOnDialog. the error message says "Setup has detected a possible infinite loop in the script withfunction WaitOnDialog. ...error 440. I did look at the article you suggested and had actually used that exact example to test a custom dialog when mine wasn't working. It didn't work either - same error. Any other ideas?
0 Kudos
selwynreynolds
Level 7

Update - I got my new custom dialog to work - not exactly sure how but the WaitOnDialog finally returned properly and went into the switch to wait for user input. The custom dialog I imported from another project, in which it works, is STILL not working. I made sure the Resource ID in the DirectEditor view was different for the two dialogs and used their respective ID's in the EzDefineDialog call, which is: EzDefineDialog("customdialog", ISUSER, "customDialog", 0) -- for the dialog that works and EzDefineDialog("importedcustdialog", ISUSER, "importedcustdialog", 5) ...I've tried using NULL instead of the ResourceID also and that doesn't work but DOES work in the original project! Still looking for ideas on the dialog that doesn't work....
0 Kudos
selwynreynolds
Level 7

SOLUTION! OK, sorry for so many posts but maybe someone can tell me WHY what I found works. I made the ResourceID for both custom dialogs = 0 in the DirectEditor and used 0 in the EzDefineDialog call as the ResourceID (EzDefineDialog("importedcustom", ISUSER, "importedcustom", 0)) and they both work now!:)
0 Kudos