handles not a struct in figure_OutputFcn
1 次查看(过去 30 天)
显示 更早的评论
Whenever I uncomment the call to uiwait in a figure's OpeningFcn, the one GUIDE generates, I always get an error message in the figure's OutputFcn stating that handles is not a structure. How is this supposed to work?
% --- Executes just before PreferencesMenu is made visible.
function PreferencesMenu_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to PreferencesMenu (see VARARGIN)
% Choose default command line output for PreferencesMenu
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes PreferencesMenu wait for user response (see UIRESUME)
uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = PreferencesMenu_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
disp('Here I am')
Note, If I leave the call to uiwait commented out, then I don't get the error and I do see the output of the disp call. What is going on here?
Thanks a bunch, Bill
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!