2 Replies Latest reply on May 17, 2006 11:09 AM by Newsgroup_User

    User-defined metadata in Flex?

    Fleks
      I'm looking for a way to associate custom metadata with AS properties (and classes). For example I would like to mark a property as "advanced" in the source code, and be able access the metadata at runtime. The following of course won't work, but shows an example syntax of what I'm looking for:

      @advanced
      var myAdvancedProperty;

      Ideally the metadata support would be built into AS (similar to how things work in Java 1.5 and C#), but I would also be interested in other solutions.

      Thanks
        • 1. Re: User-defined metadata in Flex?
          Level 7
          "Fleks" <webforumsuser@macromedia.com> wrote in message
          news:e4dku2$315$1@forums.macromedia.com...
          > I'm looking for a way to associate custom metadata with AS properties (and
          > classes). For example I would like to mark a property as "advanced" in
          > the
          > source code, and be able access the metadata at runtime. The following of
          > course won't work, but shows an example syntax of what I'm looking for:
          >
          > @advanced
          > var myAdvancedProperty;

          The metadata is used by the MXML compiler (mxmlc) and the internal
          document-generation tool. There's no way to add your own metadata and access
          it at runtime (as far as I know).

          --
          Manish Jethani
          Developer, Flex Framework
          Adobe Systems Inc.


          • 2. Re: User-defined metadata in Flex?
            Level 7
            Here is a little more information:

            Not in this release. The compiler can leave metadata in the swf at compile
            time, and you can read it back at runtime using describeType. But the list
            of metadata the compiler leaves in is hardcoded right now. I expect we'll
            make it extensible in a future release.

            --
            Jason Szeto
            Adobe Flex SDK Developer


            "Manish Jethani" <mjethani@adobe.com> wrote in message
            news:e4er1i$gao$1@forums.macromedia.com...
            > "Fleks" <webforumsuser@macromedia.com> wrote in message
            > news:e4dku2$315$1@forums.macromedia.com...
            >> I'm looking for a way to associate custom metadata with AS properties
            >> (and
            >> classes). For example I would like to mark a property as "advanced" in
            >> the
            >> source code, and be able access the metadata at runtime. The following of
            >> course won't work, but shows an example syntax of what I'm looking for:
            >>
            >> @advanced
            >> var myAdvancedProperty;
            >
            > The metadata is used by the MXML compiler (mxmlc) and the internal
            > document-generation tool. There's no way to add your own metadata and
            > access it at runtime (as far as I know).
            >
            > --
            > Manish Jethani
            > Developer, Flex Framework
            > Adobe Systems Inc.
            >
            >