Changeset 6455 for issm/trunk/src/m/kml/kml_polystyle.m
- Timestamp:
- 10/29/10 10:13:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/kml/kml_polystyle.m
r6454 r6455 48 48 else 49 49 if ~isempty(inputname(i)) 50 warning('Argument ''%s'' for field''%s'' is a ''%s'' class object, not ''%s''.',...50 warning('Argument ''%s'' for property ''%s'' is a ''%s'' class object, not ''%s''.',... 51 51 inputname(i),fnames{i},class(varargin{i}),class(kml.(fnames{i}))); 52 52 else 53 warning('Argument %d for field''%s'' is a ''%s'' class object, not ''%s''.',...53 warning('Argument %d for property ''%s'' is a ''%s'' class object, not ''%s''.',... 54 54 i ,fnames{i},class(varargin{i}),class(kml.(fnames{i}))); 55 55 end … … 72 72 disp(sprintf(' fill: %d' ,kml(i).fill)); 73 73 disp(sprintf(' outline: %d\n' ,kml(i).outline)); 74 end 75 76 end 77 78 % set the properties of the object 79 80 function [kml]=set(kml,varargin) 81 82 kmlref=feval(class(kml)); 83 84 % loop through each parameter in the input list (comparing to the reference 85 % object in case property types have been changed) 86 87 for i=1:2:length(varargin) 88 if isfield(kmlref,varargin{i}) 89 if isa(varargin{i+1},class(kmlref.(varargin{i}))) 90 kml.(varargin{i})=varargin{i+1}; 91 else 92 if ~isempty(inputname(i+1)) 93 warning('Argument ''%s'' for property ''%s'' is a ''%s'' class object, not ''%s''.',... 94 inputname(i+1),varargin{i},class(varargin{i+1}),class(kmlref.(varargin{i}))); 95 else 96 warning('Argument %d for property ''%s'' is a ''%s'' class object, not ''%s''.',... 97 i+1 ,varargin{i},class(varargin{i+1}),class(kmlref.(varargin{i}))); 98 end 99 end 100 else 101 warning('Property ''%s'' for class ''%s'' does not exist.',... 102 varargin{i},class(kmlref)); 103 end 74 104 end 75 105
Note:
See TracChangeset
for help on using the changeset viewer.