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!