User`s guide

9 Managing and Sh aring Application Data in GUIDE
.
.
.
uiresume(handles.figure);
Protecting and Positioning the Text Change Dialog
1 The user opens the Text Change dialog box by triggereing the main GUI’s
buttonChangeMe_Callback callback, which supplies the main G UI’s figure
handle as a property called
changeme_main.
2 The OpeningFcn for the dialog box validates the input by searching and
indexing into the
varagin cell array. If 'changeme_main' and a handle
are f ound as successive arguments, it calls
uiwait. This ensures that the
dialog GU I can exit w itho ut waiting for
OutputFcn to close the figure. If it
does not find the property or finds an invalid value, the modal dialog box
displays an error and exits.
function change me_d ialog_OpeningFcn(hObjec t, ...
eventdata, ha ndle s, varargin)
% Is the changeme_main gui's handle is passed in varargin?
% if the name 'changeme_main' is found, and the next argument
% varargin{m ainG uiInput+1} is a handle, assume we can open it.
dontOpen = false;
mainGuiInput = find(strcmp(varargin, 'changeme_main'));
if (isempty( main GuiInput))
|| (length(va rarg in) <= mainGuiInput )
|| (~ishandle (var argin{mainGuiInput+1}))
dontOpen = true;
else
.
.
.
end
.
.
.
if dontOpen
9-26