Home > marsbar > @marmoire > set_item_data.m

set_item_data

PURPOSE ^

sets data for item

SYNOPSIS ^

function [o, errf] = set_item_data(o, item, data, filename)

DESCRIPTION ^

 sets data for item
 FORMAT [o errf] = set_item_data(o, item, data, filename)

 o        - object
 item     - name of item to set for
 data     - data to set 
 filename - filename for data
 
 If neither data nor filename are set, then GUI set is assumed
 
 Returns
 o        - object with data set
 errf     - flag is 1 if data was not set

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [o, errf] = set_item_data(o, item, data, filename)
0002 % sets data for item
0003 % FORMAT [o errf] = set_item_data(o, item, data, filename)
0004 %
0005 % o        - object
0006 % item     - name of item to set for
0007 % data     - data to set
0008 % filename - filename for data
0009 %
0010 % If neither data nor filename are set, then GUI set is assumed
0011 %
0012 % Returns
0013 % o        - object with data set
0014 % errf     - flag is 1 if data was not set
0015 %
0016 % $Id$
0017 
0018 if nargin < 2
0019   error('Need item to set to');
0020 end
0021 if nargin < 3
0022   data = NaN;
0023 end
0024 if nargin < 4
0025   filename = NaN;
0026 end
0027 
0028 if pr_is_nan(data) & pr_is_nan(filename)
0029   action = 'set_ui';
0030 else
0031   action = 'set';
0032 end
0033 [o errf] = do_set(o, item, action, data, filename);

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019