Returns the return value from the last InvokePBFunction or TriggerPBEvent function.
Window ActiveX controls
activexcontrol.GetLastReturn ( )
Argument |
Description |
---|---|
activexcontrol |
Identifier for the instance of the PowerBuilder window ActiveX control. When used in HTML, the ActiveX control is the NAME attribute of the object element. When used in other environments, this references the control that contains the PowerBuilder window ActiveX. |
Any. Returns the last return value.
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.
This JavaScript example calls the GetLastReturn function:
...
retcd = PBRX1.TriggerPBEvent(theEvent, numargs);
rc = parseInt(PBRX1.GetLastReturn());
if (rc != 1) {
alert("Error. Empty string.");
}
...
This VBScript example calls the GetLastReturn function:
...
retcd = PBRX1.TriggerPBEvent(theEvent, & numargs, args)
rc = PBRX1.GetLastReturn()
IF rc <> 1 THEN
msgbox "Error. Empty string."
END IF
...