User`s guide

9 Managing and Sh aring Application Data in GUIDE
.
.
.
% Update handles structure
guidata(hObject, h andles);
The Color Palette nee ds to remember the Icon Editor for later:
% in colorPalette
function guide_col orpalette_OpeningFcn(hObject,eventdata,handles,varargin)
handles.output = hObject;
.
.
.
handles.iconEditor = [];
iconEditorInput = find(strcmp(varargin, 'ico nEditor'));
if ~isempty(iconEd itorInput)
handles.iconEditor = varargin{iconEditorInput+1};
end
.
.
.
% Update handles structure
guidata(hObject, h andles);
The Tool Palette also needs to remember the Icon Editor:
% in toolPalette
function guide_too lpalette_OpeningFcn(hObject, ...
eventdata, handles, varargin)
handles.output = hObject;
.
.
.
handles.iconEditor = [];
iconEditorInput = find(strcmp(varargin, 'ico nEditor'));
if ~isempty(iconEd itorInput)
handles.iconEditor = varargin{iconEditorInput+1};
end
9-36