• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Async.asyncNativeResponder in place of Async.Responder?

Enthusiast ,
May 24, 2011 May 24, 2011

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.

TOPICS
FlexUnit

Views

3.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , May 24, 2011 May 24, 2011

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

...

Votes

Translate

Translate
Advocate ,
May 24, 2011 May 24, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 24, 2011 May 24, 2011

Copy link to clipboard

Copied

LATEST

I have both builds in the same folder so my ide was pickup only the as one up,

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines