Andrew Madu wrote:
> Hi,
> can someone remind me how to cast types in flowscript? What I have is:
>
> var response = (DoDirectPaymentResponseType)
> caller.call("DoDirectPayment", request);
Javascript does not do compile-time type checking, so "casting" is
completely unnecessary. Just go ahead and access properties and call
methods on your response variable; it will let you know at runtime if
those methods or properties don't exist.
var response = caller.call("DoDirectPayment", request);
var amount = response.getAVSCode(); //successful
var oops = response.notAMethod(); //runtime error
If you're more comfortable with compile-time type checking and Java in
general you might check out the JavaFlow block which lets you write your
flow in pure Java.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]