Creating Graphical User Interfaces |
 |
Executing a Callback
This is the feval
switchyard that enables modaldlg
to execute the callback subfunctions. It relies on the fact that when modaldlg
is called to execute a callback, the first argument is a string (the name of the callback).
elseif ischar(varargin{1}) % Invoke named subfunction or callback
try
[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
catch
disp(lasterr);
end
end
| Wait for User Response | | Defining the Yes and No Buttons Callbacks |  |