How to check if errordlg is shown

4 views (last 30 days)
FB1905
FB1905 on 4 Dec 2024
Answered: Walter Roberson on 4 Dec 2024
Hi alls,
I have a button, when button is clicked, errordlg is shown by the code
dialog = DAStudio.DialogProvider;
dialog.errordlg(message, dialogName, true);
How can I check whether the errdlg is shown and closed it automatically?
Thanks

Answers (1)

Walter Roberson
Walter Roberson on 4 Dec 2024
Looking at /Applications/MATLAB_R2024b.app/toolbox/shared/dastudio/+DAStudio/@DialogProvider/DialogProvider.m it appears to be
dialog = DAStudio.DialogProvider;
d = dialog.errordlg(message, dialogName, true);
%...
if isvalid(d)
clear d
end

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!