1 Reply Latest reply on Jun 1, 2010 8:26 AM by Flex harUI

    Error #1047 for constructor initializers

    VilleFluide

      Hi,

       

      it seems that there is a compiler error when trying to use static const in constructor initializer. Example is :

       

      import com.villefluide.fluideinfo.util.enums.OverlayType;


          [Bindable]

          [RemoteClass(alias="com.villefluide.fluideinfo.util.VFStrokeStyle")]

          public class VFStrokeStyle extends VFStrokeStyleBase {


      public function VFStrokeStyle(aalpha:Number=1.,acolor:int=0,athickness:int=1,aoverlayType:OverlayType=Ove rlayType.CURRENT_GOOGLE_TRIPS_OUTWARDS) {

      alpha=alpha;

      color=acolor;

      thickness=athickness;

      overlayType=aoverlayType

      }

      the 4th parameter generates an error #1047 : : Parameter initializer is unknown. Of course this const exists in our code, and we do have the right import.
      Following code works :
      public function VFStrokeStyle(aalpha:Number=1.,acolor:int=0,athickness:int=1,aoverlayType:OverlayType=nul l) {
      alpha=alpha;
      color=acolor;
      thickness=athickness;
      if (!aoverlayType) aoverlayType = OverlayType.CURRENT_GOOGLE_TRIPS_OUTWARDS;
      overlayType=aoverlayType;
      }
      Is it a known issue ?