필터 지우기
필터 지우기

Error running GUI outside of GUIDE

조회 수: 1 (최근 30일)
Adrien
Adrien 2013년 7월 9일
Hi,
I designed a UI using GUIDE, such that the push button allows me to select a file from a folder and a list box displays the name of the file. I proceeded to run it (run figure in GUIDE) and it worked.
The issue here is when I close GUIDE and open the .fig file. In this case, it returns the error shown:
??? Reference to non-existent field 'listbox3'.
Error in ==> mlp_gui>sel_out_dat_Callback at 84
set(handles.listbox3,'String',handles.outputdata)
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> mlp_gui at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)mlp_gui('sel_out_dat_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
My guess for this error is that the handle for the listbox was not created in the case where I operated the UI outside of GUIDE?
Any suggestions to correct this will be helpful.
Thanks!

답변 (2개)

David Sanchez
David Sanchez 2013년 7월 9일
Are you trying to run the m-file associated to the fig-file? You have to run the .m file in order to run your GUI.
( Right click on m-file -> run )
( Type in command window the name of the m-file (no-extension needed) )
  댓글 수: 1
Adrien
Adrien 2013년 7월 9일
편집: Adrien 2013년 7월 9일
Hi David,
No, I'm not. I'm trying to get the GUI itself (i.e. .fig file) to work. In my case the GUI (.fig) works when I run it from the m-file or GUIDE. But once I close both and try to run .fig on its own it fails.
On the other hand, are you saying that I cannot run the GUI using just the .fig file? That I would need to prompt it using the m-file instead?
Thanks.

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


Ravi
Ravi 2013년 7월 9일
Click GUI icon on toolbar or Type GUIDE in Command Window... Then GUI window opens.... Click Open Existing GUI... Open the GUI created by you... Then RUN
  댓글 수: 1
Adrien
Adrien 2013년 7월 9일
Hi Ravi,
Thanks for the help, but this isn't the issue.
I tried running the GUI (.fig) by clicking on it in the Current folder window and it failed, but it was ok when I tried running (debugging) it in the m-file or GUIDE.
Please advise.

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

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by