In this routine:
if ([thing we test for])
{
var diaLog = plugins.dialogs.showWarningDialog
(‘[alert]’,‘[message]’,‘Cancel’,‘Proceed’);
application.output(diaLog)
if (diaLog == ‘Cancel’)
{
return
}
databaseManager.startTransaction();
[whatever happens next]
}
… I would like to have the resulting behavior the same whether the user clicks the ‘Cancel’ button or whether they close the dialog by clicking on the little red and white X in the corner of the dialog (‘close button’).
I could reproduce the functionality in a FID, and methodically control the close button. But I’d like to understand how to accomplish this when using a the dialog plug-in.
Essentially, this amounts to trapping for the dialog closing.
How can that be done?
Jim