FindClassDefinition PowerScript function
Description
Searches for an object in one or more PowerBuilder libraries
(PBLs) and provides information
about its class definition.
Syntax
|
1 |
<span>FindClassDefinition</span> ( <span>classname</span> {, <span>librarylist</span> } ) |
|
Argument |
Description |
|---|---|
|
classname |
The name of an object (also called a |
|
librarylist |
An array of strings whose values are |
Return Values
ClassDefinition. Returns an object reference with information
about the definition of classname. If any arguments
are null, FindClassDefinition returns null.
Usage
There are two ways to get a ClassDefinition object containing
class definition information:
-
For
an instantiated object in your application, use its ClassDefinition property -
For an object stored in a PBL,
call FindClassDefinition
Examples
This example searches the libraries for the running
application to find the class definition for w_genapp_frame:
|
1 |
ClassDefinition cd_windef |
|
1 |
cd_windef = <span>FindClassDefinition</span>("w_genapp_frame") |
This example searches the libraries in the array ls_libraries to
find the class definition for w_genapp_frame:
|
1 |
ClassDefinition cd_windef |
|
1 |
string ls_libraries[ ] |
|
1 |
|
1 |
ls_libraries[1] = "c:pwrsizappwindows.pbl" |
|
1 |
ls_libraries[2] = "c:pwrsframewkwindows.pbl" |
|
1 |
ls_libraries[3] = "c:pwrsframewkancestor.pbl" |
|
1 |
|
1 |
cd_windef = <span>FindClassDefinition</span>( |
|
1 |
"w_genapp_frame", ls_libraries) |