A ClassDefinition object is a PocketBuilder object that provides information about the class of another PocketBuilder object. You can examine a class in a PocketBuilder library or the class of an instantiated object. By examining the properties of its ClassDefinition object, you can get details about how that class fits in the PocketBuilder object hierarchy.
Desktop only ClassDefinition, ScriptDefinition, and other objects that descend from the ClassDefinitionObject object can be used in the development environment, but not in applications deployed to Windows CE devices or emulators.
From the ClassDefinition object, you can discover:
The variables, functions, and events defined for the class
The class’s ancestor
The class’s parent
The class’s children (nested classes)
Related objects The ClassDefinition object is a member of a hierarchy of objects, including the TypeDefinition, VariableDefinition, and ScriptDefinition objects, that provide information about datatypes or about the variables, properties, functions, and event scripts associated with a class definition.
For more information, see the Browser or the online Help.
Definitions for instantiated objects For each object instance, a ClassDefinition property makes available a ClassDefinition object to describe its definition. The ClassDefinition object does not provide information about the object instance, such as the values of its variables. You get that information by addressing the instance directly.
Definitions for objects in libraries An object does not have to be instantiated to get class information. For an object in a PocketBuilder library, you can call the FindClassDefinition function to get its ClassDefinition object.
Performance Class definition objects may seem to add a lot of overhead, but the overhead is incurred only when you refer to the ClassDefinition object. The ClassDefinition object is instantiated only when you call FindClassDefinition or access the ClassDefinition property of a PocketBuilder object. Likewise, for properties of the ClassDefinition object that are themselves ClassDefinition or VariableDefinition objects, the objects are instantiated only when you refer to those properties.