Home > m > gui > @jcontrol > setappdata.m

setappdata

PURPOSE ^

SETAPPDATA function overloaded for JCONTROL class

SYNOPSIS ^

function setappdata(obj, name, data)

DESCRIPTION ^

 SETAPPDATA function overloaded for JCONTROL class

 SETAPPDATA places data in the application data area of the hgcontrol
 component of a JCONTROL

 Example:
 setappdata(obj, fieldname, data)

 See also: JCONTROL, JCONTROL/GETAPPDATA, JCONTROL/ISAPPDATA
 JCONTROL/RMAPPDATA SETAPPDATA

 -------------------------------------------------------------------------
 Author: Malcolm Lidierth 07/07
 Copyright  The Author & King's College London 2007
 -------------------------------------------------------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function setappdata(obj, name, data)
0002 % SETAPPDATA function overloaded for JCONTROL class
0003 %
0004 % SETAPPDATA places data in the application data area of the hgcontrol
0005 % component of a JCONTROL
0006 %
0007 % Example:
0008 % setappdata(obj, fieldname, data)
0009 %
0010 % See also: JCONTROL, JCONTROL/GETAPPDATA, JCONTROL/ISAPPDATA
0011 % JCONTROL/RMAPPDATA SETAPPDATA
0012 %
0013 % -------------------------------------------------------------------------
0014 % Author: Malcolm Lidierth 07/07
0015 % Copyright  The Author & King's College London 2007
0016 % -------------------------------------------------------------------------
0017 
0018 % Revisions:
0019 % 17.08.07  Check class of obj. This method gets called when data is a
0020 %           jcontrol objectrather than obj
0021 
0022 if strcmpi(class(obj),'jcontrol')
0023     setappdata(obj.hgcontrol, name, data);
0024 else
0025     % Get here because data is a jcontrol object
0026     builtin('setappdata', obj, name, data)
0027 end
0028 return
0029 end

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003