User`s guide

Ways to Manage Data in a Programmatic GUI
Data-Sharing
Method
How it Works
Use for...
Pass function handles
or data through one
of the four following
methods:
Exposing functionality within a
GUI or between G U Is
“Nested Functions”:
share the name
space of all superior
functions
Accessing and modifying variables
defined in a directly or indirectly
enclosin g functio n, typically
within a single GUI figure
UserData:Store
data in this figure or
component property.
Communicate to
other GUIs via handle
references.
Communicating data within a
GUI or between G UIs;
UserData
is limited to one variable, often
supplied as a struct
Application Data
(
getappdata /
setappdata,...):
Store named data in a
figure or component.
Communicate to
other GUIs via handle
references.
Communicating data within a GUI
or between GUIs; any number or
types of variables can b e stored as
application data through this API
Function
handles or
private data
guidata:Store
data i n the
handles
structure of a GUI.
Communicate to
other GUIs via handle
references.
Communicating data within a GUI
or between GU Is—a convenient
way to manage application data.
GUI Data is a struct associated
with the GUI figure.
The example “Icon Editor” on page 15-63. further explains sharing data
between GUI figures.
The next three sections describe mechanisms that provide a way to manage
application-defined data, stored within a GUI:
13-3