is it possible to know if an alert dialog box has opened in app designer app?(testing purposes)
17 views (last 30 days)
Michaela Konstantinou on 23 Sep 2021
I have a loop that loads data form a dropdown list. For some values an alert dialog box is created that says that the data couldnt load due to some whatever reasons. If the alert dialog box is opened I would like
1. to skip the iteration without making the verification test
So is that possible?
Thanks in advance
More Answers (2)
Geoff Hayes on 23 Sep 2021
Michaela - if your code launches the alert dialog, then you should be able to know that it has launched and so can "skip the iteration without making the verification test". You can dismiss the dialog if you save the handle to it. For example, from warning dialog you can do
hWarnDlg = warndlg('Uh oh','Warning');
and then close it with
though you will have to be careful in case the user closes the dialog which would make hWarnDlg invalid.
Image Analyst on 23 Sep 2021
You can set some flag, like "inBatchMode" to true or false and then only show the warning popup message if the flag is set to false, like
% Only show popup message if not in batch processing mode.
% Only show in interactive mode. Tell them what file was missing or
warningMessage = sprintf('Error reading file %s', fullFileName);