1 Reply Latest reply on Jun 17, 2011 1:41 AM by Ek24ambi

    Bug in  FABridge.as


      Hello there,

      While working on my project (http://code.google.com/p/gwt4air/) i ve found a bug in the FABridge.as class.

      I decided to post it here hoping that someone at Adobe will see this and forward it to the right folks.


      Here is the problem (around line 1109)


      var object : EventDispatcher = obj as EventDispatcher;


      if (object)



         // doing some stuff here


         throw new Error(obj + ": is not an EventDispatcher. Cannot call addEventListener");


      And  this is actually wrong


      An object that implements IEventDispatcher is not necessary an EventDispatcher but can call addEventListener

      Based on  the code above calling addEventListener on that object will throw an Error which is not correct.


      I ve spend hours and hours trying to spot this error. Thinking something is wrong with my code.

      I hope you guyz will fix this in the next release





        • 1. Re: Bug in  FABridge.as
          Ek24ambi Level 1

          This is a well know design pattern in Software Enginering dough.


          "Never implement to a concrete class but to an Interface"

          The code should check if the object is an IEventDispatcher and not the concrete implementation EventDispatcher.