Class_constant |
Homepage |
Dynamically calls the "constant" function for the specified class.
returnValue := Class_constant(ClassNameOrObject, variable, setValue = "")
| ClassNameOrObject | If this value is a number, then it is assumed to be a ClassObject. The Class object's class name will be used in the dynamic call. Otherwise, this value is used for the ClassName in the dynamic call. |
| variable | The name of the variable to use for the current operation. |
| setValue | The value to set for the specified variable. If setValue = "", then the current value will be returned (the variable's value will not be modified). |
The current value for the specified variable (before the new one is set, if applicable).
If the specified variable doesn't exist, the empty string is returned.
Note: The empty string is returned if the class doesn't have a "constant" function.
The variables MUST be declared as static values before use - you cannot dynamically create them.
Declare the read/write values in "ReadWriteVariables" and the read-only values in "ReadOnlyVariables"
It is not possible to set a variable to the empty string - as passing the empty string as the second parameter would be understood as wanting to only get the previous value.
Note: the latest version of the Node_constant function doesn't require a read-only value to be specified in both lists.
;the Browser Class stores a static copy for each supported browser. ;stores the Browser object for firefox into <UsedBrowser> UsedBrowser := Class_constant("browser", "firefox") ;stores the Browser object for Opera@USB into <UsedBrowser> UsedBrowser := Class_constant("browser", "Opera@USB")