Adicionar Componentes dentro de outros

Olá a todos,

Estava desenvolvendo uma aplicação em Flex 4, e gostaria de saber como faço para colocar um componente qualquer dentro do meu componente customizado.
Vou dar um exemplo mais prático.
Criei um componente customizado retangular com BorderContainer e adicionei na minha tela principal. Porém quero colocar um botão dentro desse componente customizado (genérico, pode ser colocado qualquer outro componente dentro) e o Flex mostra um erro.
Ex.:
Tela Principal usando meu componente…

<comp:BorderContainerCustom>
<s:Button/>
</comp:BorderContainerCustom>

ou se eu quiser colocar outro componente dentro

<comp:BorderContainerCustom>
<s:Text/>
</comp:BorderContainerCustom>

Alguém sabe como resolver?

Qual o erro que mostra?

“Multiple sets of visual children have been specified for the PopUpFilter tag”.
Isso acontece quando eu coloco um componente dentro do meu componente e tento visualizar no modo Design

http://www.google.com.br/search?rlz=1C1CHNY_pt-BRBR416BR416&sourceid=chrome&ie=UTF-8&q=Multiple+sets+of+visual+children+have+been+specified

5 primeiros links:

http://www.munkiihouse.com/?p=37
http://www.tink.ws/blog/extending-your-own-mxml-components/
http://cookbooks.adobe.com/post_Adding_multiple_sets_of_visual_children_to_custom-12927.html
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg66574.html
http://forum.msdevstudio.net/index.php?topic=168.0

Leia que você entenderá porque ocorre esse problema.

Eu havia achado esses links… mas não resolveram o problema…
mas valeu assim mesmo

[quote]The Solution:
Here is a DEMO APPLICATION with ?View Source? enabled which will assist the explanation that follows.

Step one: create the property within your component which the mxml compiler will assign the set of children defined for this component to. In the example application I have called this property ?children?. Store the value which is passed into this function into a global variable so that it can be obtained later, and call the invalidateProperties() function. Calling invalidate properties will cause flex to call the commitProperties() function on this component sometime in the future, when it next is convenient to do so.

Step two: override the commitProperties() function. Here we simply loop through the components which were passed to us as children, and add them to the correct Container within outselves.

Step three: set the property you created in step one to be the ?default property? of this component. This means that components which we define as children of our custom component will automatically be assigned to this property of the component.[/quote]