ClassDefinition object
A ClassDefinition object is a PowerBuilder object that provides
information about the class definition of a PowerBuilder object. You can
examine a class in a PowerBuilder library or the class associated with an
instantiated object.
All the properties are read-only. You cannot change the class
definition using the ClassDefinition object. The ClassDefinition object
has no events.
The ClassDefinition object lets you check:
| The name of the class |
| The library the class was loaded from |
| The class definition of its ancestor, if any |
| The class definition of its parent or container object, if any |
| Whether the class is autoinstantiated |
| Whether the class is a system class (defined by PowerBuilder) or a user-defined object (defined in a PowerBuilder PBL) |
| The classes the object contains, such as the controls contained in a window |
| The variables and scripts defined in the class |
Class names are always reported as lowercase, as you see them in the
Browser.
Global functions and variables
Call FindFunctionDefinition to get a ScriptDefinition object
describing the global function. Global variables are included in the
VariableList array in the ClassDefinition object for the Application
object.
Properties
|
ClassDefinition property |
Datatype |
Description |
||||
|---|---|---|---|---|---|---|
|
Ancestor |
ClassDefinition |
An object that represents the ancestor class. |
||||
|
Category |
TypeCategory |
Specifies whether the type is simple, enumerated, |
||||
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
||||
|
DataTypeOf |
String |
The system class name of the object. DataTypeOf is
For objects you have defined, the datatype |
||||
|
IsAutoinstantiate |
Boolean |
Indicates whether the class is an autoinstantiated |
||||
|
IsStructure |
Boolean |
Indicates whether the class is a |
||||
|
IsSystemType |
Boolean |
Indicates whether the class is a system class — |
||||
|
IsVariableLength |
Boolean |
Specifies whether the datatype has a fixed size. TRUE — The datatype is variable length, FALSE — The datatype is a fixed |
||||
|
IsVisualType |
Boolean |
Indicates whether the class is a visual TRUE FALSE — The class is non-visual, for |
||||
|
LibraryName |
String |
The fully qualified name of the library the class |
||||
|
Name |
String |
The name of the class. For a nested class, the name |
||||
|
NestedClassList[ ] |
ClassDefinition |
An unbounded array of objects representing the The array is empty if there are no nested |
||||
|
ParentClass |
ClassDefinition |
An object that represents the parent class that |
||||
|
ScriptList[ ] |
ScriptDefinition |
An unbounded array of objects representing the The array is empty if there are no |
||||
|
VariableList[ ] |
VariableDefinition |
An unbounded array of objects representing the The array is empty if there are no |
Functions
|
ClassDefinition function |
Datatype returned |
Description |
|---|---|---|
|
String |
Returns the class of the object. |
|
|
ScriptDefinition |
Finds a function that matches the specified name |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Object |
Returns the type of the object. |