Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-22394

Return of the Double Responder call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • Adobe Flex SDK Previous
    • None
    • RPC: General
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      This is remarkably similar (perhaps even identical) to the double responder calling bug in Flex 3.4 which was resolved in 3.4.1

      Steps to reproduce:
      1. Create an application like this:
      <?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"
      preinitialize="getByToken()"
      implements="mx.rpc.IResponder">

      <fx:Script>
      <![CDATA[
      import mx.rpc.AsyncToken;
      import mx.rpc.IResponder;
      import mx.rpc.http.HTTPService;

      [Bindable]
      private var asSvcCounter:int;
      private var asSvc:HTTPService;
      private var token:AsyncToken;

      private function getByToken():void

      { asSvc = new HTTPService(); asSvc.resultFormat = "e4x"; asSvc.url = "xml/game-analysis.xml"; token = asSvc.send(); token.addResponder(this); }

      public function result(result:Object):void

      { asSvcCounter++; }

      public function fault(fault:Object):void{

      }
      ]]
      >
      </fx:Script>
      <s:Label text="Called:

      {asSvcCounter.toString()}

      times" horizontalCenter="0" verticalCenter="0" fontSize="40"/>
      </s:Application>

      2. Run the Application

      Actual Results:
      Result handler called twice , so text is shown as Called: 2 times

      Expected Results:
      Result Handler should only be called once, and text should show "Called: 1 times"

      Workaround (if any):

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: