why am I getting this error:

Error using matlab.ui.control.UIControl/set
Invalid or deleted object.
Error in GUI>Start_Callback (line 184)
set(handles.TrainText,'String','Loading Train Image # ');
my code is:
i = 1;
while (i<=numImage)
%get(handles.TrainText,'String');
set(handles.TrainText,'String','Loading Train Image # ');
drawnow();
% set(handles.TrainText,'String','Loading Train Image # ');
% drawnow();
disp(sprintf('Loading Train Image # %d',i));
i=i+1;
end
where TrainText is an edit text component.

2 件のコメント

Geoff Hayes
Geoff Hayes 2018 年 3 月 26 日
werad - is TrainText the name of the edit/text control? Are you sure that handles.TrainText is a valid handle to that control and that you have not overwritten it at any time in your code?
Rik
Rik 2018 年 3 月 26 日
Have you closed the figure that contained this object? If so, you will have to recreate the handles (so saving the handles in a .mat file doesn't work).

回答 (0 件)

この質問は閉じられています。

質問済み:

2018 年 3 月 26 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by