source: trunk/src/fill_GUI.m @ 360

Last change on this file since 360 was 360, checked in by sommeria, 12 years ago

civ: bugs corrected. Iintroduction of an xm file for parameters read using the new fct fill_GUI (to test and improve)
cleaning in uvmat. Possibility of using blank increment added (go to the next available file)
fullfile_uvmat: case of two equal indices in a pair, bug repair.
find_fileseries: improved speed.

File size: 1000 bytes
Line 
1% -----------------------------------------------------------------------
2% --- read a GUI with handle 'handle' producing a structure 'struct'
3function errormsg=fill_GUI(Param,handles)
4%------------------------------------------------------------------------
5errormsg='';
6fields=fieldnames(Param);
7for ifield=1:numel(fields)
8    if isstruct(Param.(fields{ifield}))
9        fields{ifield}
10        if isfield(handles,fields{ifield})
11        errormsg=fill_GUI(Param.(fields{ifield}),get(handles.(fields{ifield}),'children'));
12        end
13    else
14        fields{ifield}
15        num2str(Param.(fields{ifield}))
16        if isnumeric(Param.(fields{ifield}))
17            if isfield(handles,['num_' fields{ifield}])
18            set(handles.(['num_' fields{ifield}]),'String',num2str(Param.(fields{ifield})))
19            end
20        else
21            if isfield(handles,fields{ifield})
22            set(handles.(fields{ifield}),'String',num2str(Param.(fields{ifield})))
23            end
24        end
25    end
26end
27 
Note: See TracBrowser for help on using the repository browser.