save data for item to file using GUI FORMAT [saved_f o] = save_item_data_ui(o, item, flags, filename) o - object item - name of item flags - flags for save; see save_item_data.m for details filename - filename for save Returns saved_f - flag set to 1 if save done, 0 not done, -1 if cancel Note that, if saving with more than one item, then the value is from the last value saved/not saved. Cancel aborts the attempt to save. o - possibly modified object (changed filename, maybe data is left as a file, and data field made empty) $Id$
0001 function [saved_f, o] = save_item_data_ui(o, item, flags, filename) 0002 % save data for item to file using GUI 0003 % FORMAT [saved_f o] = save_item_data_ui(o, item, flags, filename) 0004 % 0005 % o - object 0006 % item - name of item 0007 % flags - flags for save; see save_item_data.m for details 0008 % filename - filename for save 0009 % 0010 % Returns 0011 % saved_f - flag set to 1 if save done, 0 not done, -1 if cancel 0012 % Note that, if saving with more than one item, then the value 0013 % is from the last value saved/not saved. Cancel aborts the 0014 % attempt to save. 0015 % o - possibly modified object (changed filename, maybe data is 0016 % left as a file, and data field made empty) 0017 % 0018 % $Id$ 0019 0020 if nargin < 2 0021 error('Need item'); 0022 end 0023 if nargin < 3 0024 flags = NaN; 0025 end 0026 if nargin < 4 0027 filename = NaN; 0028 end 0029 0030 if ~isstruct(flags), flags = []; end 0031 flags.ui = 1; 0032 0033 [saved_f o] = save_item_data(o, item, flags, filename);