Quintiq file version 2.0
|
#parent: #root
|
Function CalcSuggestedName
|
{
|
TextBody:
|
[*
|
value := this.TG_UIForm().CreatedName();
|
|
if( value = '' )
|
{
|
value := this.TG_UIForm().Title();
|
}
|
|
singlecomponent := this.TG_UIForm().TG_UIComponent( relsize ) = 1;
|
|
if( not singlecomponent )
|
{
|
if( this.SplitterPaneTitle() <> '' )
|
{
|
value := value + '_' + this.SplitterPaneTitle();
|
}
|
else
|
{
|
value := value + '_' + this.Name();
|
}
|
}
|
|
if( value <> '' )
|
{
|
value := TG_TestGenerator::ConvertToIdentiferCamelCase( value );
|
}
|
else
|
{
|
value := this.Name();
|
}
|
|
prefix := this.TG_UIForm().TG_TestGenerator().TG_GlobalParameter().UIComponentPrefix();
|
if( not value.StartsWith( prefix ) )
|
{
|
value := prefix + value;
|
}
|
|
// TODO : Max character for identifier
|
//value := value.SubString( 0, minvalue( value.Length(), 20 ) );
|
|
this.SuggestedName( value );
|
*]
|
}
|