|
Hello all!
I have a listbox which I'm trying to populate with some
information I'd like to save. The listbox should populate as
soon as the figure shows, so I've added the code within the
CreateFcn callback. The GUIDE skeleton for the function
(MATLAB R12.1) is:
function varargout = listbox_CreateFcn(h, eventdata,
handles, varargin)
The 'handles' variable is empty. When I try to call
guidata(h), it also returns an empty array. guihandles
returns all of the handles in the figure, but when I try to
call guidata to save to any of the handles returned by
guihandles, they don't seem to save so they're accessible by
other callbacks later on. I'm very confused about what
approach to use for GUIs:
1) guidata -- seems you can both save and retrieve, so only
one function is required
2) setappdata/getappdata -- use one or the other to save and
retrieve. Why would this be used above guidata?
3) global variables -- this is another way to store
application data
4) guihandles -- what's the difference between this and
calling guidata with a single argument?
|