incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: Multiple ways of generating objects.
Date Tue, 07 Aug 2012 14:50:10 GMT

On 8/7/12 7:23 AM, "João Fernandes" <>

> Recently we needed to improve our app when it comes to generate dynamic
> views based on a descriptor. Currently I'm changing our engine to create
> elements similar to what the compiler & SDK does. The problem is, it uses
> different approaches based on the type of containers. If it's a MX
> container it will use childDescriptors, if it's a SkinnableContainer it
> will use mxmlContentFactory and if it's a regular Group it will generate
> directly by using mxmlContent property. My question is, isn't there a
> better way?
Not really, but childDescriptors are pretty inefficient.  You'd be better
off just doing addChild.  Are you trying to improve performance?  I think
the key is to make sure to parent the containers before adding their
children.  That's especially true in Spark, IIRC.

Alex Harui
Flex SDK Team
Adobe Systems, Inc.

View raw message