Home Forums General XMetaL Discussion doModal in xft forms Reply To: doModal in xft forms

Derek Read

Reply to: doModal in xft forms

Actually, the return values are 1 and 2:
OK button (or “OK” the form via some other means) = 1
Cancel button (or dismiss the form via some other means) = 2

You can confirm this by running the following code:

[code]//XMetaL Script Language JScript:
var xftPath = Application.Path + “\forms\ulink.xft”;
var dlg=Application.CreateFormDlg(xftPath);
var retval = dlg.DoModal();
Application.Alert(retval);[/code]

The sample form in this case is really meant to be used with the Journalist demo, but should launch with the code above regardless (just don't fill anything in before clicking OK / Cancel / Close button or ESC key). Or substitute your own form at line 2 for xftPath.

I agree, this should be documented.

Reply

Products
Downloads
Support