Skip navigation
Currently Being Moderated

Async.asyncNativeResponder in place of Async.Responder?

May 24, 2011 7:15 AM

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.

 
Replies
  • Currently Being Moderated
    May 24, 2011 9:06 AM   in reply to nikos101

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points