1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod FindOrCreate (TG_UIDialog owner, Key fieldkey, String name,  
 |    String display, String type, String databinding,  
 |    Number index, String sizeposition) as TG_UIField 
 |  { 
 |    TextBody: 
 |    [* 
 |      uifield := select( owner, TG_UIField, field, field.Name() = name ); 
 |       
 |      if( isnull( uifield ) ) 
 |      { 
 |        uifield := owner.TG_UIField( relnew, 
 |                                     Name := name ); 
 |      } 
 |       
 |      uifield.Display( display ); 
 |      uifield.FieldKey( fieldkey ); 
 |      uifield.Type( type ); 
 |      uifield.DataBinding( databinding ); 
 |      uifield.Index( index ); 
 |      uifield.SizePosition( sizeposition ); 
 |       
 |      uifield.UpdateValueType(); 
 |       
 |      return uifield; 
 |    *] 
 |  } 
 |  
  |