1 Reply Latest reply on May 19, 2011 1:33 AM by blazejewicz

    strange way to instance varables

    Benoitcn Level 1
      aArray = new ArrayCollection;
      aArray = new ArrayCollection();
      Do these the two ways of instance varables have the same result ?
        • 1. Re: strange way to instance varables
          blazejewicz Level 4


          this seems to be shortcut (compiler feature) but only for constructors for classes that:

          - have no arguments at all

          - have defaults values for argument in constructor, e.g.:

          public function MyClass(name:String=null)

          - or have rest arguments in constructor

          public function MyClass(... rest)

          I've been seeing that usage before in others code but I don't remember if there is anything official on that usage in AS3 reference docs,