Copy link to clipboard
Copied
I'm using 4.1 and the asyc class doesn't seem to have Async.Responder, so I tried this:
token.addResponder(Async.asyncNativeResponder(this, onResult, faultHandler, 600));
but get an issue:
Implicit coercion of a value of type flash.net:Responder to an unrelated type mx.rpc:IResponder.
There are two types of responders:
flash.net.Responder which is in Flash Player
mx.rpc.IResponder which is a Flex class
So, if you want to be able to use mx.rpc.IResponder (a Flex class) you need to have a Flex build of FlexUnit. This functionality is not included in the ActionScript only build as it is not part of the ActionScript API.
If you have a Flex build the Async class will have:
Async.asyncResponder() which returns an IResponder
Async.asyncNativeResponder() will return a flash.net.Responder
...Copy link to clipboard
Copied
There are two types of responders:
flash.net.Responder which is in Flash Player
mx.rpc.IResponder which is a Flex class
So, if you want to be able to use mx.rpc.IResponder (a Flex class) you need to have a Flex build of FlexUnit. This functionality is not included in the ActionScript only build as it is not part of the ActionScript API.
If you have a Flex build the Async class will have:
Async.asyncResponder() which returns an IResponder
Async.asyncNativeResponder() will return a flash.net.Responder, hence your error.
Mike
Copy link to clipboard
Copied
I have both builds in the same folder so my ide was pickup only the as one up,
thanks