Getting a class definition object

To work with class information, you need a class definition object. 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 example, in a script for a button, this code gets the class definition for the parent window:

ClassDefinition cd_windef
cd_windef = Parent.ClassDefinition

For an object stored in a PBL

Call FindClassDefinition.

For example, in a script for a button, this code gets the class definition for the window named w_genapp_frame from a library on the application’s library list:

ClassDefinition cd_windef
cd_windef = FindClassDefinition("w_genapp_frame")