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!