Searches for an object in one or more PocketBuilder libraries (PKLs) or PowerBuilder libraries (PBLs) and provides information about its class definition.
PocketBuilder applications This function can be used only in the development environment. It cannot be used in applications deployed to a Pocket PC or Smartphone device.
FindClassDefinition ( classname {, librarylist } )
Argument |
Description |
---|---|
classname |
The name of an object (also called a class or class definition) for which you want information. |
librarylist (optional) |
An array of strings whose values are the fully qualified pathnames of PKLs or PBLs. If you omit librarylist, FindClassDefinition searches the library list associated with the running application. |
ClassDefinition. Returns an object reference with information about the definition of classname. If any arguments are null, FindClassDefinition returns null.
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 PKL or PBL, call FindClassDefinition
This example searches application libraries to find the class definition for w_mywindow:
ClassDefinition cd_windef
cd_windef = FindClassDefinition("w_mywindow")
This PowerBuilder example searches the libraries in the array ls_libraries to find the class definition for w_genapp_frame:
ClassDefinition cd_windef
string ls_libraries[ ]
ls_libraries[1] = "c:\pwrs\bizapp\windows.pbl"
ls_libraries[2] = "c:\pwrs\framewk\windows.pbl"
ls_libraries[3] = "c:\pwrs\framewk\ancestor.pbl"
cd_windef = FindClassDefinition(
"w_genapp_frame", ls_libraries)