hi...i am getting an error as "Error using ==> hgload at 156 Recursion occurs when loading". full error is given below...
3 次查看(过去 30 天)
显示 更早的评论
??? Error using ==> hgload at 156 Recursion occurs when loading D:\vandana\Sinter_GUI\Sintering_GUI.fig
Error in ==> openfig at 72 [fig, savedvisible] = hgload(filename, struct('Visible','off'));
Error in ==> gui_mainfcn>local_openfig at 286 gui_hFigure = openfig(name, singleton, visible);
Error in ==> gui_mainfcn at 159 gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);
Error in ==> Sintering_GUI at 42 gui_mainfcn(gui_State, varargin{:});
??? Error using ==> struct2handle Error while evaluating uicontrol CreateFcn
>>
回答(3 个)
Walter Roberson
2015-7-6
I suspect you might be attempting to start your GUI by double-clicking on the .fig file. GUIs must be started by running their .m file.
Jan
2015-7-8
Set a breakpoint in the local_openfig function and step through your code line by line until you find the command, which calls the function to open the figure recursively. Then clean up this command.
Gabriella
2017-2-15
Hi vandana,
I came across your post because I just encountered the same problem. I don't know whether you have solved it, but I hope so for you, since it's been many months... Anyway, just in case this might be helpful for anyone, I have discovered a silly mistake in one of my CreateFcn, namely:
function axes_trace_CreateFcn(hObject, eventdata, handles)
axes(hObject) % INCRIMINATED LINE
axes(handles.axes_trace) % fixed code
I assume that GUIDE was interpreting the first call to hObject as "make the GUI figure the current axes"... Not sure though, since within that function I still use this line without a problem:
set(hObject, 'TickDir', 'out')
Anyway changing that line fixed the problem.
@Jan Simon
Would you be so kind to help me figure this out? I'm one of those newbies who still makes some confusion between hObject referred to the GUI fig versus the hObject referred to the object being used in a specific moment. Does it have anything to do with setting up the axes in my case?
Any feedback is much appreciated :)
Thanks!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!