GetLastReturn PowerScript function
Description
Returns the return value from the last InvokePBFunction or TriggerPBEvent function.
Controls
Window ActiveX controls
Syntax
|
1 |
<span>activexcontrol</span>.<span>GetLastReturn</span> ( ) |
|
Argument |
Description |
|---|---|
|
activexcontrol |
Identifier for the instance of the PowerBuilder |
Return Values
Any. Returns the last return value.
Usage
Call this function after calling InvokePBFunction or TriggerPBEvent to
access the return value. JavaScript scripts must use this function
to access return values from InvokePBFunction and TriggerPBEvent.
VBScript scripts can either use this function or access the return
value using an argument in InvokePBFunction or TriggerPBEvent.
Examples
This JavaScript example calls the GetLastReturn function:
|
1 |
... |
|
1 |
retcd = PBRX1.TriggerPBEvent(theEvent, numargs); |
|
1 |
rc = parseInt(PBRX1.<span>GetLastReturn</span>()); |
|
1 |
if (rc != 1) { |
|
1 |
alert("Error. Empty string."); |
|
1 |
} |
|
1 |
... |
This VBScript example calls the GetLastReturn function:
|
1 |
... |
|
1 |
retcd = PBRX1.TriggerPBEvent(theEvent, & <br> numargs, args) |
|
1 |
rc = PBRX1.<span>GetLastReturn</span>() |
|
1 |
IF rc <> 1 THEN |
|
1 |
msgbox "Error. Empty string." |
|
1 |
END IF |
|
1 |
... |