Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

AxisOption new: Difference between revisions

From Catglobe Wiki
No edit summary
Cg_pham (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Axis set modifying CGScript functions]]
{{HelpFiles}}  
{{HelpFiles}}


====AxisOption_new====
==== AxisOption_new ====


This function is the axis option object's constructor and will return an array which must have 4 elements, configured like specified below:
This function is the axis option object's constructor and will return an array which must have 4 elements, configured like specified below:  


* OBJECT_TYPE: Object type information. It must have the same value as TYPE_AXIS_OPTION constant.
*OBJECT_TYPE: Object type information. It must have the same value as TYPE_AXIS_OPTION constant.  
* AXIS_OPTION_NAME: The name of the axis option, it is the value of the argument name passed to the constructor function
*AXIS_OPTION_NAME: The name of the axis option, it is the value of the argument name passed to the constructor function  
* AXIS_OPTION_VALUE: The value expression for the axis option, it is the value of the value argument which might be passed to the constructor function.
*AXIS_OPTION_VALUE: The value expression for the axis option, it is the value of the value argument which might be passed to the constructor function.  
*AXIS_OPTION_PCT_BASE 


'''Syntax'''
'''Syntax'''  


AxisOption_new(''name [, value]'')
AxisOption_new(''name [, value]'')  


'''Arguments'''
'''Arguments'''  


''name: ''Is a string expression. It is the name of the axis option.
''name: ''Is a string expression. It is the name of the axis option.  


value: Is a string expression. It is a bool CGS expression.
value: Is a string expression. It is a bool CGS expression.  


'''Return type'''
'''Return type'''  


array
array  


'''Examples'''
'''Examples'''  


array axisOption = AxisOption_new("Adult");
''array axisOption = AxisOption_new("Adult");''


axisOption[AXIS_OPTION_VALUE] = "Age == [18-55]";
''axisOption[AXIS_OPTION_VALUE] = "Age == [18-55]"; ''


'''Availability'''
''print(axisOption);''  


Version 5.5
''//Result: {1,Adult,Age == [18-55],}''
__NOTOC__
 
<!-- imported from file: 5439.htm-->
'''Availability'''
 
Version 5.5&nbsp;
 
[[Category:Axis_set_modifying_CGScript_functions]]

Latest revision as of 08:41, 6 January 2012



AxisOption_new

This function is the axis option object's constructor and will return an array which must have 4 elements, configured like specified below:

  • OBJECT_TYPE: Object type information. It must have the same value as TYPE_AXIS_OPTION constant.
  • AXIS_OPTION_NAME: The name of the axis option, it is the value of the argument name passed to the constructor function
  • AXIS_OPTION_VALUE: The value expression for the axis option, it is the value of the value argument which might be passed to the constructor function.
  • AXIS_OPTION_PCT_BASE 

Syntax

AxisOption_new(name [, value])

Arguments

name: Is a string expression. It is the name of the axis option.

value: Is a string expression. It is a bool CGS expression.

Return type

array

Examples

array axisOption = AxisOption_new("Adult");

axisOption[AXIS_OPTION_VALUE] = "Age == [18-55]";

print(axisOption);

//Result: {1,Adult,Age == [18-55],}

Availability

Version 5.5