Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method ParseDialogSubComponents (TG_UIDialog tg_dialog, GUIComponent component) id:Method_GlobalStateTestGenerator_ParseDialogSubComponents 
 | 
{ 
 | 
  #keys: '[142876.9.1250934789]' 
 | 
  Body: 
 | 
  [* 
 | 
    name := ''; 
 | 
    componentkey := Key::ZeroKey(); 
 | 
    display := component.Display(); 
 | 
    databinding := component.GetProperty( 'DataBinding' ); 
 | 
    type := ''; 
 | 
    issupported := true; 
 | 
     
 | 
    if( component.istype( Editor ) ) 
 | 
    { 
 | 
      type := 'Editor'; 
 | 
    } 
 | 
    else if( component.istype( GUIDurationSelector ) ) 
 | 
    { 
 | 
      type := 'GUIDurationSelector'; 
 | 
    } 
 | 
    else if( component.istype( CheckBox ) ) 
 | 
    { 
 | 
      type := 'CheckBox'; 
 | 
    } 
 | 
    else if( component.istype( RadioButtonGroup ) ) 
 | 
    { 
 | 
      type := 'RadioButtonGroup'; 
 | 
    } 
 | 
    else if( component.istype( Selection ) ) 
 | 
    { 
 | 
      type := 'Selection'; 
 | 
    } 
 | 
    else if( component.istype( GUIDateTimeSelector ) ) 
 | 
    { 
 | 
      type := 'GUIDateTimeSelector'; 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      issupported := false; 
 | 
    } 
 | 
     
 | 
    name := GlobalStateTestGenerator.GetComponentNameFromDisplay( display ); 
 | 
    componentkey := component.Key(); 
 | 
     
 | 
    if( issupported ) 
 | 
    { 
 | 
      cd := select( ApplicationScope.Project().ComponentRegistry().GetAllComponents(), Elements, mcd, 
 | 
                    mcd.Name() = name ); 
 | 
      index := guard( cd.Index(), -1 ); 
 | 
      sizeposition := component.GetProperty( 'SizePosition' ); 
 | 
      TG_UIField::FindOrCreate( tg_dialog, componentkey, name, display, type, databinding, index, sizeposition ); 
 | 
    } 
 | 
     
 | 
    traverse( component, SubComponents, child ) 
 | 
    { 
 | 
      GlobalStateTestGenerator.ParseDialogSubComponents( tg_dialog, child ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |