0 Replies Latest reply on May 7, 2007 2:43 AM by Chielosos

    Is describeType() bugged ?

    Chielosos
      Hello people,

      I don't know if anyone ever tried this, but I did and found some weirdness:

      I was making a tool (sort of like Flexible) that uses the properties of a class to determine what can be set, and how things can be set. So I used describeType.

      All well so far, got a nice ouput and all, but after I started applying code logic, I noticed that the xml document returned has some akward things. For example, the "enabled" property of the panel class I used can be found *three* times. And every time it's completely the same. It messes up my code because I would think that a property is unique and doesn't show up three times in the XML output. I copied the output below, to prove this.

      <accessor name="enabled" access="readwrite" type="Boolean" declaredBy="mx.core::UIComponent">
      <metadata name="Bindable">
      <arg key="" value="enabledChanged"/>
      </metadata>
      </accessor>

      <accessor name="enabled" access="readwrite" type="Boolean" declaredBy="mx.core::UIComponent">
      <metadata name="Bindable">
      <arg key="" value="enabledChanged"/>
      </metadata>
      </accessor>

      <accessor name="enabled" access="readwrite" type="Boolean" declaredBy="mx.core::UIComponent">
      <metadata name="Bindable">
      <arg key="" value="enabledChanged"/>
      </metadata>
      </accessor>

      I don't see any difference in their content, so why does this piece of XML show up three times while other properties just show up once ? I'd love to get an explanation on this subject. Maybe I'm doing something wrong, but this sure feels like a bug...

      Michiel.