Handles do not load without GUIDE opened

조회 수: 3 (최근 30일)
Matyas Kadlas
Matyas Kadlas 2017년 7월 21일
답변: Akhilesh Thakur 2017년 7월 27일
Hello guys, I started fixing an old GUI and I encountered an unexpected error that I am unable to fix. If I start my GUI without GUIDE window opened, handles structure is empty and every time I use get or set I get an error "Attempt to reference field of non-structure array." (well it is empty, that's why). BUT when I open GUIDE window and start the GUI again the handles structure is filled and whole program is able to run without any problems. Sadly I cannot post code to this program (company policy).
Anyone encountered similar problem?
Thanks in advance.
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 7월 21일
How are you starting your GUI? It is not possible to start the GUI just by double-clicking on the .fig file: you need to run the .m file
Matyas Kadlas
Matyas Kadlas 2017년 7월 21일
편집: Matyas Kadlas 2017년 7월 21일
This might be the problem. I just right click the *.fig and click open. I always thought that when I run the *.fig it starts the *.m file with it.
EDIT: Guess I just forgot how to work with GUIs after all that time.

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

채택된 답변

Akhilesh Thakur
Akhilesh Thakur 2017년 7월 27일
If the handle's structure is not loaded or is empty that means your GUI is not running. You are simply running or opening the figure. By opening GUIDE you actually open the figure and edit and if you run it it will definitely run. Try running .m file it will work.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by