Hmm, I thought we had removed that rule, but it’s generally just a parsing restriction.  A faceless component isn’t contained by visual containers so it shouldn’t be nested inside of them in MXML.

 

Beyond coding style this shouldn’t really affect you, right?

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Sergey Kovalyov
Sent: Monday, August 21, 2006 8:05 AM
To: [email protected]
Subject: Re: [flexcoders] Instantiating object in MXML

 

Yes, you are right. But I implemented IMXMLObject interface. My class
instantiates in the root of the component, but nowhere else. On the
other hand native RadioButtonGroup that is also inherited from
EventDispatcher, not UIComponent, could be instantiated even inside
nested containers. Why so?

On 8/21/06, Daniel Thompson <[EMAIL PROTECTED]net> wrote:
> >From Programming ActionScript 3.0:
>
> "If you use Flex, you should know that Flex defines many component display
> object classes, and these classes override the display list access methods of
> the DisplayObjectContainer class. For example, the Container class of the
> mx.core package overrides the addChild() method and other methods of the
> DisplayObjectContainer class (which the Container class extends). In the case of
> the addChild() method, the class overrides the method in such a way that you
> cannot add all types of display objects to a Container instance in Flex. The
> overridden method, in this case, requires that the child object that you are
> adding be a type of mx.core.UIComponent object."
>
> I'd be willing to bet that the MXML is calling addChild() and you haven't
> extended UIComponent.

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to