1 Reply Latest reply on Aug 24, 2008 2:00 PM by Newsgroup_User

    [Inspectable] Type=Array default values?

    Level 7
      Hi --

      I am working on a custom component in Flash 8 / ActionScript 2.0 and I have
      an inspectable property that is of type Array. I would like to set the
      default values for the array but I can not figure out how to do this. I have
      tried:

      [Inspectable(name="Month Names", defaultValue="January","February"
      type=Array)]

      [Inspectable(name="Month Names", defaultValue=["January","February"]
      type=Array)]

      [Inspectable(name="Month Names", defaultValue=("January","February")
      type=Array)]

      [Inspectable(name="Month Names", defaultValue="January,February"
      type=Array)]


      I either get a compiler error or a single value of January. Any thoughts?

      Thanks

      Rich


        • 1. Re: [Inspectable] Type=Array default values?
          Level 7
          Hi --

          I figured this out. I forget the comma after the array values. DOH! The
          correct answer is:

          [Inspectable(name="Month Names", defaultValue="January,February",
          type=Array)]

          Rich

          "Richard Morey" <rwmorey71@hotmail.com> wrote in message
          news:g8n6c9$p4o$1@forums.macromedia.com...
          > Hi --
          >
          > I am working on a custom component in Flash 8 / ActionScript 2.0 and I
          > have an inspectable property that is of type Array. I would like to set
          > the default values for the array but I can not figure out how to do this.
          > I have tried:
          >
          > [Inspectable(name="Month Names", defaultValue="January","February"
          > type=Array)]
          >
          > [Inspectable(name="Month Names", defaultValue=["January","February"]
          > type=Array)]
          >
          > [Inspectable(name="Month Names", defaultValue=("January","February")
          > type=Array)]
          >
          > [Inspectable(name="Month Names", defaultValue="January,February"
          > type=Array)]
          >
          >
          > I either get a compiler error or a single value of January. Any thoughts?
          >
          > Thanks
          >
          > Rich
          >
          >