2 Replies Latest reply on Jul 17, 2007 6:50 PM by jaswcomp

    MXML attributes

    jaswcomp Level 1
      The <mx:ProjectBar> tag has a source attribute. I have created a custom MXML component that has a source attribute, but I want it to accept only a specific object type. Right now I have it set to to receive a generic Object type. If I change it to a custom object type, example MyCustomType:

      public var myCustomASClass:MyCustomType;

      <myforms:MyCustomMXMLComponent source="myCustomASClass"/>

      FlexBuilder shows this error:

      Initializer for 'source': values of type MyCustomType cannot be represented in text.

      The application compiles, but Flex Builder continues to show an error.

      Is it possible to pass a typed instance of an AS class to a custom MXML component?