2 Replies Latest reply on Nov 15, 2009 4:19 PM by mewk

    Responder Class Conflict


      This is my first pass at using FlashBuilder and the Flex 4 SDK for that matter, so hopefully this is a simple issue that I just can't find the obvious answer for. When I attempt to compile the following app I get this error below.  Why is the compiler attempting to use the Responder from the flash.net package and what is the workaround for this?


      Thanks in advance to anyone who can shed some light!


      Can not resolve a multiname reference unambiguously. flash.net:Responder (from /Applications/Adobe Flash Builder Beta/sdks/4.0.0/frameworks/libs/player/10/playerglobal.swc(flash/net/Responder)) and mx.rpc:Responder (from /Applications/Adobe Flash Builder Beta/sdks/4.0.0/frameworks/libs/rpc.swc(mx/rpc/Responder)) are available.    Main.mxml    BWSite/src    Unknown    Flex Problem



      APP CODE:

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" creationComplete="creationCompleteHandler(event)">
                  import mx.rpc.remoting.RemoteObject;
                  import mx.rpc.Responder;
                  import mx.rpc.AsyncToken;
                  import mx.events.FlexEvent;
                  import mx.rpc.events.FaultEvent;
                  import mx.rpc.events.ResultEvent;
                  protected var songService:RemoteObject;
                  protected function song_resultHandler(event:ResultEvent):void
                      // TODO Auto-generated method stub


                  protected function song_faultHandler(event:FaultEvent):void
                      // TODO Auto-generated method stub


                  protected function creationCompleteHandler(event:FlexEvent):void
                      songService = new RemoteObject();
                      songService.destination = "ColdFusion";
                      songService.source = "myservermapping.components.song";
                      var token:AsyncToken = songService.getSongs();
                      var callResponder:Responder = new Responder( onResult, onFault );
                      token.addResponder( callResponder );
                  protected function onResult(e:ResultEvent):void
                  protected function onFault(e:FaultEvent):void





        • 1. Re: Responder Class Conflict

          I had the same problem and resolve with a shortcut


          var responder:IResponder = new mx.rpc.Responder(result,fault);



          But still looking for a better solution.


          That`s it

          (sorry for my awful english)

          • 2. Re: Responder Class Conflict
            mewk Level 3

            There are two classes of the same name from two different packages. Given that you've imported from mx.rpc (and only from there), there should not be any ambiguity.


            So this has gotta be a bug and is still present as of build 11566. Please file a jira bug report if you want.


            The workaround is to write the full class name, i.e.

            var callResponder:mx.rpc.Responder = new  mx.rpc.Responder( onResult, onFault );



            - e