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

CustomColumn new

From Catglobe Wiki
Revision as of 09:46, 12 December 2011 by Cg huyphong (talk | contribs)



CustomColumn_new

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

  • OBJECT_TYPE: Object type information which should have the same value as TYPE_CUSTOM_COLUMN constant.
  • CUSTOM_COLUMN_DATA_TYPE: The type of the custom column, it is the value of the argument dataType passed to the constructor function.
  • CUSTOM_COLUMN_NAME: The name of the custom column, it is the value of the argument name passed to the constructor function.
  • CUSTOM_COLUMN_TEXT: The text which will be used for the axis created when the column is added to the DCS in the current context. It has "" as the initial value.
  • CUSTOM_COLUMN_OPTIONS: The array of custom column options, it is initialized as an array with no elements.

Syntax

CustomColumn_new(dataType, name)

Arguments

dataType: is a number. It is the custom column's data type, it must have one of the following values.

  • CUSTOM_COLUMN_TYPE_NUMBER
  • CUSTOM_COLUMN_TYPE_BOOLEAN
  • CUSTOM_COLUMN_TYPE_STRING

name: is a string expression. It is the custom column's name, which must follow the DCS column name format.

Return type

array

Examples

array customColumn = CustomColumn_new(CUSTOM_COLUMN_TYPE_NUMBER, "AgeGroup");

customColumn[CUSTOM_COLUMN_TEXT] = "Age groups";

Availability

Version 5.5