Definition
Group a number of objects under one identifier.
class CLASS_NAME [is OBJECT_NAME1 [OBJECT_NAME2]...]
CLASS_NAME
The identifier for a class of objects.
OBJECT_NAMEn
The identifiers for an object.
Description
Use this statement to group a number of objects under one identifier. This allows you to define response definitions for and perform operations on a group of objects.
All of the objects in the class definition must have been previously defined in the program. The class can be initially empty.
As a general rule, it is inadvisable to group different types of objects as members of the same class. You should define classes that consist of only one type of object.
You cannot define a class as a member of another class; only individual objects can be defined as class members.
An object can be a member of more than one class.
Once a class is defined, you can reference it in any action statement that is valid for an object. When the actions are executed, they will affect all of the objects in the class. Also, you can define a response to the class, and the response will be triggered by any of the objects in the class.
Example
class Empty_CL
class Keys_CL is
KeyA KeyB KeyC ClearKey PanicKey
...
response to Keys_CL # If KeyA, KeyB, KeyC,
# ClearKey, or PanicKey is
make Panel visible # selected, Panel becomes
# visible.
response to GoBack_PB # When GoBack is selected,
# all of the objects in the
make Keys_CL invisible # class Keys are made invisible.
See Also
add to class Action Statement
delete from class Action Statement
members Special Inquiry Built-in Function