4 Replies Latest reply on Feb 18, 2008 12:21 AM by rkaw

    [Inspectable] metadata tag

    rkaw
      Hi Guys,

      I've been asked to create a WYSWIG editor (similar to Flex builder).

      One of the requirements is to add some custom components to the center panel
      and list their properties in the right panel.

      There is very useful feature in Flex called [Inspectable] metatag which
      "defines information about an attribute of the component that you expose in code hints
      and in the Property inspector area of Flex Builder."


      So I was wondering where does Flex know which properties of a component are 'wrraped around' with this metatag.

      For instance:
      Button component contains enabled property.
      Above it you can find the following line:

      [Inspectable(category="General", enumeration="true,false", defaultValue="true")]

      But where can I get this information from?

      The button component does not provide any function that returns array or list of
      inspectable properties or at least I do not see it.

      The only thing I found is describeType() method in flash.utils package
      which returns XML file with detailed information about object passed to it including:
      - implemented interfaces,
      - extended class
      - Bindable metatag etc ...

      but there is barerly info about Inspectable.

      The only info about it found in XML is the following:

      <accessor name="accessibilityImplementation" access="readwrite" type="flash.accessibility::AccessibilityImplementation" declaredBy="flash.display::InteractiveObject">
      <metadata name="Inspectable">
      <arg key="environment" value="none"/>
      </metadata>
      </accessor>


      Similar funcionality is provided by IconFile metadata tag.

      If anybody needs some more information or I was not clear enough just let me know.

      Thanks in advance.
      RK