handles not a struct in figure_OutputFcn

1 view (last 30 days)
Otis
Otis on 3 Apr 2012
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

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!