GetLastReturn
PowerScript function
Description
Returns the return value from the last InvokePBFunction or
TriggerPBEvent function.
Applies to
Window ActiveX controls
Syntax
|
1 |
activexcontrol.GetLastReturn ( ) |
|
Argument |
Description |
|---|---|
|
activexcontrol |
Identifier for the instance of the PowerBuilder |
Return value
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 2 3 4 5 6 7 |
... retcd = PBRX1.TriggerPBEvent(theEvent, numargs); rc = parseInt(PBRX1.GetLastReturn()); if (rc != 1) { alert("Error. Empty string."); } ... |
This VBScript example calls the GetLastReturn function:
|
1 2 3 4 5 6 7 8 |
... retcd = PBRX1.TriggerPBEvent(theEvent, & numargs, args) rc = PBRX1.GetLastReturn() IF rc <> 1 THEN msgbox "Error. Empty string." END IF ... |
See also