handles not a struct in figure_OutputFcn

조회 수: 1 (최근 30일)
Otis
Otis 2012년 4월 3일
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개)

카테고리

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