PDA

View Full Version : Dialog endless loop error with scripting



Salamander
02-23-2005, 11:19 AM
Hello All,

Creating a custom dialog for a install, and it ends up going into an endless loop. So I checked the return message, and I get a -1. Any help would be greatly appreciated;

nResult=EzDefineDialog(
szDialogName, // nickname for dialog
ISUSER, // DLL containing the dialog's resources
szDialogName, // name of dialog in Dialogs view
RES_DIALOG_ID);

if (nResult < 0) then
// Report an error; then terminate.
NumToStr(szTemp, nResult);
MessageBox ("Error in defining dialog box "+ szTemp, SEVERE);
abort;
endif;

Thanks,
Ryan

chrishein
02-23-2005, 11:42 AM
nResult=EzDefineDialog(
szDialogName, // nickname for dialog
ISUSER, // DLL containing the dialog's resources
szDialogName, // name of dialog in Dialogs view
RES_DIALOG_ID);

Ryan

Hi Ryan,
When you create a dialog from scratch in 10.5 you should only use the dialog name that you assigned it in the dialog editor in EzDefine. Therefore your code should probably look like:
szDialogName = "MyDialogName"; //or whatever your dialog is named.
nResult=EzDefineDialog(
szDialogName, // nickname for dialog
ISUSER, // DLL containing the dialog's resources
szDialogName, // name of dialog in Dialogs view
0);


Chris

Salamander
02-23-2005, 12:07 PM
The dialog name is Exactly equal (including capitalization) to the szDialogName string.
Dialog Name in the Dialog editor is SQLorMySQL
and the szDialogName string is getting assigned as:
szDialogName= "SQLorMySQL";

Any other ideas, or maybe I'm overlooking something??
Thanks,
Ryan