SetArgElement
PowerScript function
Description
Sets the value in the specified argument element.
Applies to
Window ActiveX controls
Syntax
|
1 |
activexcontrol.SetArgElement ( index, argument ) |
|
Argument |
Description |
|---|---|
|
activexcontrol |
Identifier for the instance of the PowerBuilder window |
|
index |
Integer specifying argument placement. |
|
argument |
Any specifying the argument value. |
Return value
Integer.
Returns 1 if the function succeeds and -1 if an error occurs.
Usage
Call this function before calling InvokePBFunction or TriggerPBEvent
to specify an argument for the passed function.
JavaScript scripts must use this function to specify function and
event arguments. VBScript scripts can either use this function or specify
the arguments array directly.
Examples
This JavaScript example calls the SetArgElement function:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function triggerEvent(f) { var retcd; var rc; var numargs; var theEvent; var theArg; retcd = 0; numargs = 1; theArg = f.textToPB.value; PBRX1.SetArgElement(1, theArg); theEvent = "ue_args"; retcd = PBRX1.TriggerPBEvent(theEvent, numargs); ... |
See also