how to solve an error using uiwait?

9 vues (au cours des 30 derniers jours)
Walaa
Walaa le 18 Déc 2022
Commenté : Walaa le 18 Déc 2022
I get these errors using uiwait . how could i solve that ?
Error using uiwait (line 48)
Input argument must be of type figure
Error in fileext (line 121)
uiwait(helpdlg('Examine the figures, then click OK to finish.'));

Réponse acceptée

Walter Roberson
Walter Roberson le 18 Déc 2022
You could get that error under a couple of different circumstances:
  • the helpdlg somehow gets closed before uiwait() gets control, in which case uiwait() would be passed a handle to a deleted figure
  • or perhaps you have some non-standard helpdlg() function that is not returning the handle to a figure
Experiment with
h = helpdlg('Examine the figures, then click OK to finish.');
class(h)
if ishghandle(h); uiwait(h); end
This will allow you to examine what is being returned by helpdlg. class() will stil show 'matlab.ui.Figure' for deleted figures, but ishghandle() is false for deleted figures
  1 commentaire
Walaa
Walaa le 18 Déc 2022
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by