4 Replies Latest reply on May 8, 2010 5:00 AM by -BoNzO-

    Vector issue with generated getter/setter

    -BoNzO- Level 2

      Hi,

       

      Let's say I have the following interface and implementor :

       

      [Bindable]

      public interface ICar

      {

          function get parts() : Vector.<DisplayObject>;

      }

       

      public class Car implements ICar

      {

          [Bindable]

          public var parts : Vector.<DisplayObject>;

      }

       

       

      This works perfectly for any type other than vector. As you know, the compiler will generate the getter/setter from the default Bindable tag and the class members will successfully match the interface. I could declare a getter and a setter in the implementor but I like to keep my code simple and short and thus want to keep using this approach for simple cases.

       

      When using vector.<anything> though, I either get a "the class does not implement the interface correctly" or just a generated code error.

       

      It seems the generated getter/setter is using the wrong type ( * instead of Vector in that case ):

       

      [Bindable(event="propertyChange")]

      public function get parts():*

      {

          return this._106437344parts;

      }

       

       

      is that a known issue ?

       

      Thanks,

       

      Alex.G