Ignore:
Timestamp:
03/19/07 18:15:51 (17 years ago)
Author:
pinsard
Message:

improvements/corrections of some *.pro headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro

    r213 r231  
    11;+ 
     2; 
    23; @file_comments 
    34; 
    4 ; 
    55; @categories 
    66; 
    7 ;  
    87; @param EVENT 
    98; 
    10 ; 
    119; @returns 
    12 ;  
    13 ;  
     10; 
    1411; @uses 
    15 ;  
    16 ;  
     12; 
    1713; @restrictions 
    18 ;  
    19 ;  
     14; 
    2015; @examples 
    21 ;  
    22 ;  
     16; 
    2317; @history 
    24 ;  
    25 ;  
    26 ; @version  
     18; 
     19; @version 
    2720; $Id$ 
    28 ;  
     21; 
    2922; @todo 
    3023; seb: documenter EVENT 
    3124;- 
    32 ;********************************************************************* 
     25; 
    3326PRO selectfile_event, event 
    34 ; 
    3527; 
    3628  compile_opt idl2, strictarrsubs 
     
    4840  case eventuvalue.name of 
    4941; cancel button 
    50     'Global Cancel':BEGIN  
     42    'Global Cancel':BEGIN 
    5143      widget_control, event.handler, get_uvalue = messenger 
    5244      *messenger = -1 
     
    5850      filename = isafile(filename = filename[0], /onlync, iodirectory =  iodir $ 
    5951                         , title = 'data file name', /tryfind, /fully_qualify_path) 
    60       if size(filename, /type) NE 7 then BEGIN  
     52      if size(filename, /type) NE 7 then BEGIN 
    6153        widget_control, event.id, set_value = '' 
    6254        return 
     
    7264; switch automatic/by and mesh definition buttons 
    7365    'gridload':BEGIN 
    74       IF event.select EQ 1 THEN BEGIN  
     66      IF event.select EQ 1 THEN BEGIN 
    7567        widget_control, widget_info(event.handler, find_by_uname = 'argtxt'), set_value = '' 
    7668        widget_control, widget_info(event.handler, find_by_uname = 'kwdtxt'), set_value = '' 
     
    8678            widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 1 
    8779            widget_control, widget_info(event.handler, find_by_uname = 'kwdlab'), set_value = 'keywords of IDL procedure:' 
    88           END  
     80          END 
    8981        ENDCASE 
    90       ENDIF  
     82      ENDIF 
    9183    END 
    9284; name of the procedure or batch file 
     
    9789        widget_control, event.id, set_value = '' 
    9890        return 
    99       endif  
     91      endif 
    10092      CASE protype(filename) OF 
    10193; this is a procedure 
    102         'proc':BEGIN  
     94        'proc':BEGIN 
    10395          widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 1 
    10496          widget_control, widget_info(event.handler, find_by_uname = 'kwd base'), sensitive = 1 
     
    10698        END 
    10799; this is a function, this case is not accepted 
    108         'func':BEGIN  
     100        'func':BEGIN 
    109101          widget_control, event.id, set_value = '' 
    110102          return 
    111103        END 
    112104; this is an IDL batch file 
    113         'batch':BEGIN  
     105        'batch':BEGIN 
    114106          widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 0 
    115107          widget_control, widget_info(event.handler, find_by_uname = 'kwd base'), sensitive = 0 
     
    136128      datafilename = isafile(filename = datafilename, /tryfind, /onlync $ 
    137129                             , title = 'data file name', /fully_qualify_path) 
    138       if size(datafilename, /type) NE 7 then BEGIN  
     130      if size(datafilename, /type) NE 7 then BEGIN 
    139131        widget_control, widget_info(event.handler, find_by_uname = 'datafilename') $ 
    140132                        , set_value = '' 
    141133        return 
    142       ENDIF  
     134      ENDIF 
    143135      widget_control, widget_info(event.handler, find_by_uname = 'gridload') $ 
    144136                      , get_value = gridload 
     
    162154            widget_control, meshload_id, set_value = '' 
    163155            return 
    164           endif  
    165         END  
     156          endif 
     157        END 
    166158        'via initnetcdf':meshload = datafilename 
    167159      ENDCASE 
     
    176168  return 
    177169end 
    178 ;********************************************************************* 
     170; 
    179171;+ 
     172; 
    180173; @file_comments 
    181174; 
    182 ; 
    183175; @categories 
    184176; 
    185 ;  
    186177; @param DATAFILENAME 
    187178; 
     
    192183; @param ARGSPRO 
    193184; 
    194 ;  
    195185; @keyword _EXTRA 
    196 ; Used to pass your keywords 
    197 ;  
     186; Used to pass keywords 
     187; 
    198188; @returns 
    199 ;  
    200 ;  
     189; 
    201190; @uses 
    202 ;  
    203 ;  
     191; 
    204192; @restrictions 
    205 ;  
    206 ;  
     193; 
    207194; @examples 
    208 ;  
    209 ;  
     195; 
    210196; @history 
    211 ;  
    212 ;  
    213 ; @version  
     197; 
     198; @version 
    214199; $Id$ 
    215 ;  
     200; 
    216201; @todo 
    217202; seb: documenter les params 
    218 ;  
     203; 
    219204;- 
    220205FUNCTION selectfile, datafilename, idlfile, argspro, _extra = ex 
     
    224209; 
    225210@common 
    226 ;------------------------------------------------------------ 
    227 ;------------------------------------------------------------ 
    228 ; 
    229 ; We create a pointer in the uvalue to recuperate answers at setted  
    230 ; questions atthe time of the use of this widget. So when the widget  
    231 ; is deleted in the procedure ...event.pro, the variable on which the  
    232 ; pointer pointed (contained in the uvalue of the widget) is not  
     211; 
     212; We create a pointer in the uvalue to recuperate answers at setted 
     213; questions atthe time of the use of this widget. So when the widget 
     214; is deleted in the procedure ...event.pro, the variable on which the 
     215; pointer pointed (contained in the uvalue of the widget) is not 
    233216; deleted and we can recuperate the result! 
    234217; 
     
    269252 
    270253;------------------------------------------------------------ 
    271   IF n_elements(datafilename) NE 0 THEN BEGIN  
     254  IF n_elements(datafilename) NE 0 THEN BEGIN 
    272255    widget_control, database, set_value = datafilename 
    273256    selectfile_event, {ID:database, TOP:base, HANDLER:base} 
    274   ENDIF  
    275   IF n_elements(idlfile) NE 0 THEN BEGIN  
     257  ENDIF 
     258  IF n_elements(idlfile) NE 0 THEN BEGIN 
    276259    widget_control, basemeshload, set_value = idlfile 
    277260    selectfile_event, {ID:basemeshload, TOP:base, HANDLER:base} 
    278261    widget_control, basemeshload, get_value = idlfile2 
    279262    IF idlfile2[0] NE '' THEN widget_control, gdldid, set_value = 1 
    280   ENDIF  
     263  ENDIF 
    281264  IF n_elements(argspro) NE 0 THEN widget_control, argbase, set_value = argspro 
    282265;------------------------------------------------------------ 
    283   IF n_elements(datafilename) EQ 0 THEN BEGIN  
     266  IF n_elements(datafilename) EQ 0 THEN BEGIN 
    284267    widget_control, base, /realize 
    285268    xmanager, 'selectfile', base, event_handler = 'selectfile_event', no_block = 0 
     
    302285  if size(res3, /type) NE 8 then return,  -1 
    303286 
    304   return, {fileparameters:res3, readparameters:ccreadparameters, meshparameters:ccmeshparameters}  
     287  return, {fileparameters:res3, readparameters:ccreadparameters, meshparameters:ccmeshparameters} 
    305288end 
Note: See TracChangeset for help on using the changeset viewer.