Reputation: 1799
Whenever I access my gui via typing guide untitled in command line and pushing the green arrow called Run Figure it does work perfectly.
But when I try to run it simply by clicking untitled.fig in the sidebar I get some errors as I put some values and click a button to calculate.
Attempt to reference field of non-structure array.
Error in untitled>oblicz_Callback (line 81)
v = get(handles.wprowadz, 'String');
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in untitled (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)untitled('oblicz_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
Upvotes: 0
Views: 1310
Reputation: 13876
That's because you're not supposed to open a GUI via the *.fig file, but via the associated *.m file, which contains the code to correctly open the *.fig file, with all the associated callbacks.
So if you want to run your GUI, either open the *.fig file through GUIDE as you currently do, or run the corresponding *.m file.
Upvotes: 2