Description
Returns a long integer code that indicates the class of the current PBDOM_OBJECT.
Syntax
pbdom_object_name.GetObjectClass()
Return value
Long.
GetObjectClass returns a long integer code that indicates the class of the current PBDOM_OBJECT. If pbdom_object_name is a PBDOM_ATTRIBUTE, the returned value is 5.
Examples
This example illustrates polymorphism: pbdom_obj is declared as PBDOM_OBJECT but instantiated as PBDOM_ATTRIBUTE. A message box returns the result of the GetObjectClass method invoked for PBDOM_ATTRIBUTE. Here the result is 5, indicating that pbdom_obj is a PBDOM_ATTRIBUTE object.
PBDOM_OBJECT pbdom_obj pbdom_obj = Create PBDOM_ATTRIBUTE MessageBox ("Class", & string(pbdom_obj.GetObjectClass()))
Usage
This method can be used for diagnostic purposes to dynamically determine the type of a PBDOM_OBJECT at runtime.
See also