Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

9.8.1 Receiving Object References Using Class Names

If you want to use class object references, as described in "Accessing Objects Using Class Object References" above, you need to receive the object reference in a USAGE OBJECT REFERENCE item of the appropriate class.

Event procedures that receive object references usually have skeleton object references inserted, by PowerCOBOL, in the LINKAGE SECTION of the event code. For example, in the NodeClick event of the TreeView control, the following is displayed by default in the LINKAGE SECTION:

  01  POW-PCMNODE  OBJECT REFERENCE  [Class-name].

For a node object, the appropriate class is POW-CNODE so you overtype "[Class-name]" with "POW-CNODE", giving:

  01  POW-PCMNODE  OBJECT REFERENCE  POW-CNODE.

You can then use POW-PCMNODE to access properties and invoke methods.