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

Calling PowerScript from an extension – PowerBuilder Library

Calling PowerScript from an extension

Examples – PB Docs 125

Examples The following code fragments are from a C++ program that opens a window. The window has a menu item that invokes the Open event of a PowerBuilder application. Calling ProcessPBMessage The call to ProcessPBMessage is in a loop in the WinMain function:

Loading the PBVM and triggering an event In the WndProc function,…

GetArray – PB Docs 125

PBBoundedArrayCreator template class: GetArray method Description Obtains an array that has been created. Syntax

Return Values pbarray. Examples This example sets up an array, reads in values, and then obtains the values in the array:

See Also SetAt Document get from Powerbuilder help Thank you for watching.

SetAt – PB Docs 125

PBArrayAccessor template class: SetAt method Description Sets the array item at the specified dimension. Syntax For arrays of a specified ValueType:

For string arrays:

Argument Description dim The dimension of the array item to be set v A ValueType defined in pbtraits.h string A string of type pbstring or LPCTSTR Return Values None….

SetToNull – PB Docs 125

IPB_Value interface: SetToNull method Description Sets the data contained in the IPB_Value instance to null so the data can be reset. Syntax

Return Values PBXRESULT. If the value is a read-only argument, the error PBX_E_READONLY_ARGS is returned. Examples This example shows the use of SetToNull when a null blob value is returned:

See…

IPB_Value interface – PB Docs 125

IPB_Value interface IPB_Value has three sets of methods: helper methods, set methods, and get methods. Helper methods The IPB_Value interface helper methods provide access to information about variables and arguments, including the value’s class and type, whether it is an array or simple type, whether it is set by reference, and whether the null flag…

GetAt – PB Docs 125

PBObjectArrayAccessor class: GetAt method Description Obtains the array item at the specified dimension. Syntax

Return Values pbobject. Argument Description dim The dimension of the array item to be set Examples This example shows the use of GetAt in an object array:

See Also SetAt Document get from Powerbuilder help Thank you for watching.

IPB_Arguments interface – PB Docs 125

IPB_Arguments interface The IPB_Arguments interface has two methods: GetCount obtains the number of arguments in a method call. GetAt obtains the value at a specific index of the pArgs member of the PBCallInfo structure. For each argument, GetAt returns a pointer to the IPB_Value interface. The following code fragment uses GetCount and GetAt in a…

PBCallInfo structure – PB Docs 125

PBCallInfo structure The PBCallInfo structure is used to hold data and return type information for calls between extensions and the PBVM. It has three public members:

The following code initializes a PBCallInfo structure using the IPB_Session InitCallInfo method. After allocating a PBCallInfo structure called ci, the IPB_Session GetClass and GetMethodID methods are used to…

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

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…

Step 1: Decide on a feature to implement – PB Docs 125

Step 1: Decide on a feature to implement The first step in building a PowerBuilder extension is to identify a problem that an extension can solve. This might be a feature that can be coded more efficiently and easily in C++ than in PowerScript, or that requires the use of callback functions or nonstandard datatypes….