Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GetDisplayNameForSelection (
|
String scenarioname,
|
String datasetname
|
) declarative as String
|
{
|
TextBody:
|
[*
|
// The best way is actually use String::NewLine or representation conversion
|
// Using StringNewLine wont works because that will introcude HTML tags being displayed in the slection. RFC
|
// Using Conversion wont work because is still bound the String name.
|
// One draw brack of current fix is that if there us too many scenario, there will be a ... being displayed in the selection
|
// Revisit this method once the RFC has been implemented
|
|
value := scenarioname;
|
|
if( datasetname.FindString( typeof( MacroPlan ).ShortName(), 0 ) > -1 )
|
{
|
// This is a Invisible Character, type with Alt+0160 which consume a space and does not get parse as normal Space.
|
specialWhiteSpace := " ";
|
accumulatedWhiteSpace := "";
|
|
number := guard( [Number]datasetname.ReplaceAll( typeof( MacroPlan ).ShortName(), "" ), 0 );
|
|
if( number > 0 )
|
{
|
for( x := 0; x <= number; x++ )
|
{
|
accumulatedWhiteSpace := accumulatedWhiteSpace + specialWhiteSpace;
|
}
|
|
value := value + accumulatedWhiteSpace;
|
}
|
}
|
|
return value;
|
*]
|
}
|