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.
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 |
Category |
TypeCategory |
Specifies whether the type is simple, |
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
DataTypeOf |
String |
The system class name of the object.
For objects you have defined, the datatype is the system class from |
IsAutoinstantiate |
Boolean |
Indicates whether the class is an autoinstantiated |
IsStructure |
Boolean |
Indicates whether the class is a structure. |
IsSystemType |
Boolean |
Indicates whether the class is a system |
IsVariableLength |
Boolean |
Specifies whether the datatype has a
|
IsVisualType |
Boolean |
Indicates whether the class is a visual
|
LibraryName |
String |
The fully qualified name of the library |
Name |
String |
The name of the class. For a nested class, |
NestedClassList[ ] |
ClassDefinition |
An unbounded array of objects representing The array is empty if there are no nested classes. Call the UpperBound |
ParentClass |
ClassDefinition |
An object that represents the parent |
ScriptList[ ] |
ScriptDefinition |
An unbounded array of objects representing The array is empty if there are no scripts. Call the UpperBound function |
VariableList[ ] |
Variable |
An unbounded array of objects representing The array is empty if there are no variables. Call the UpperBound function |
Functions
ClassDefinition function |
Datatype returned |
Description |
---|---|---|
String |
Returns the class of the object. |
|
ScriptDefinition |
Finds a function that matches the specified |
|
Integer |
Creates a reference to a context-specific |
|
PowerObject |
Returns a reference to the name of the |
|
Object |
Returns the type of the object. |