hObject is not created when running GUIDE *.m file - what can be done?

Hello,
please see snap shot below:
I'm using MATLAB 2013b.
It's works perfectly fine in MATLAB 2015 and above.
What could be the cause of this? I need to compile my GUI in MATLAB 2013, but for some reason it doesn't want to "create" any hObject & handles objects...
What can be done?
THANKS !!!

댓글 수: 4

Can you attach your m file ?
In your screenshot it look like hObject is created just fine. What is you question?
this is how it looks in MATLAB 2015. You can see hObject is 1x1 Figure, and NOT a single value int.
I don't see the issue. At some point the handle to objects was no longer exposed to the user, but treated as an object. None of the syntax became incompatible because of that.
f=figure(1);set(f,'Visible','off')
set(f,'UserData','foo')
disp(get(1,'UserData'))
foo
class(f)
ans = 'matlab.ui.Figure'
There are many reasons to avoid GUIDE, but this specific 'issue' is not one of them.

댓글을 달려면 로그인하십시오.

 채택된 답변

Jan
Jan 2020년 11월 24일

0 개 추천

The m-files created by GUIDE are not compatible with other Matlab versions You can expect such troubles.

댓글 수: 3

Just to add my two cents:
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.
@Jan
Thank you Jan, that was it.
BTW, strangely enough, m-file that was created by GUIDE in MATLAB 2020, opened in MATLAB 2017 quite fine...
@Rik
Thanks. Unfortunately it's a legacy APP with thousands of code lines... not so simple to switch to APP Designer at the moment...
AppDesigner is only one other option, but I understand your problem.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2020년 11월 24일

댓글:

Rik
2020년 11월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by