GetArgElement PowerScript function
Description
Returns the value in the specified argument.
Controls
Window ActiveX controls
Syntax
|
1 |
<span>activexcontrol</span>.<span>GetArgElement</span> ( <span>index</span> ) |
|
Argument |
Description |
|---|---|
|
activexcontrol |
Identifier for the instance of the PowerBuilder |
|
index |
Integer specify the argument to return. |
Return Values
Any. Returns the specified argument.
Usage
Call this function after calling InvokePBFunction or TriggerPBEvent to
access the updated value in an argument passed by reference.
JavaScript scripts must use this function to access arguments
passed by reference. VBScript scripts can use this function if they
established the argument list via calls to SetArgElement.
Examples
This JavaScript example calls the GetArgElement function:
|
1 |
... |
|
1 |
theArg = f.textToPB.value; |
|
1 |
PBRX1.SetArgElement(1, theArg); |
|
1 |
theFunc = "of_argref"; |
|
1 |
retcd = PBRX1.InvokePBFunction(theFunc, numargs); |
|
1 |
rc = parseInt(PBRX1.GetLastReturn()); |
|
1 |
|
1 |
    IF (rc != 1) { |
|
1 |
alert("Error. Empty string."); |
|
1 |
} |
|
1 |
backByRef = PBRX1.<span>GetArgElement</span>(1); |
|
1 |
... |