Changeset 309 for trunk/src/read_GUI.m


Ignore:
Timestamp:
Nov 30, 2011, 11:09:12 PM (12 years ago)
Author:
sommeria
Message:

many bugs corrected, cleaning of civ.m, resize of the GUI civ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_GUI.m

    r295 r309  
    1 % --------------------------------------------------------------------
     1% -----------------------------------------------------------------------
    22% --- read a GUI with handle 'handle' producing a structure 'struct'
    33function struct=read_GUI(handle)
     4%------------------------------------------------------------------------
    45struct=[];%default
    56hchild=get(handle,'children');
     
    4344                        listinput=get(hchild(ichild),'String');
    4445                        value=get(hchild(ichild),'Value');
    45                         input=listinput(value);       
     46                        input=listinput(value);
     47                        separator=regexp(tag,'_');
     48                        if strcmp(tag(1:separator),'num_')
     49                            input=str2double(input);% transform to numerical values if the uicontrol tag begins with 'num_'
     50                            tag=tag(separator+1:end);
     51                        end
    4652                    otherwise
    4753                        check_input=0;
Note: See TracChangeset for help on using the changeset viewer.