Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Step 5: Export methods to create class instances – PB Docs 2019 – PowerBuilder Library

Step 5: Export methods to create class instances – PB Docs 2019

Step
5: Export methods to create class instances

PowerBuilder creates nonvisual and visual class instances
differently:

  • For visual classes, the instance is created when the window or
    visual control in which the class is used is opened. See Creating visual class
    instances
    .

  • For nonvisual classes, the instance is created when the
    PowerBuilder CREATE statement is used. This is described
    next.

When the PowerBuilder application creates an instance of a
nonvisual class using the PowerScript CREATE statement, the PBVM calls
the PBX_CreateNonVisualObject method in the extension. Every extension
that contains nonvisual native classes must export this method.

In the same way that multiple classes are included in a single
description passed by PBX_GetDescription, PBX_CreateNonVisualObject can
be used to create multiple classes.

In this example, the extension has three classes. An IF statement
compares the name of the class passed in from the PowerBuilder
CREATE statement to the name of each of the classes in the extension in
turn and creates an instance of the first class with a matching name.
You could also use a CASE statement. The class name in the string
comparison must be all lowercase:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x