I think the button's content replaces the base classes content. You might
want to use a SkinnableContainer, put the group's content in a default skin.
Ok, I understand your suggestion, but
this means that is not possible to extend custom components in Flex 4 ?
I say this because if I need to put all elements of MyComponentOne into a skin to be able to have those elements visible into MyComponentTwo (extends MyComponentOne), this is not component extension...
Some one know how extend a Custom Component in Flex 4 ?
I read on forums that is not possible extend custom component using MXML, you can only with AS...
I'm not sure on that...
It is definitely possible to extend custom components using MXML. Both of your code samples are doing just that.
The question is why does the second not seem to be inheriting all the children from the first. You'll need to read up on the Flex Component LifeCycle, make use of those methods and perhaps step through some code to see what is really going on.
I don't know enough of the Flex 4 lifecycle yet to tell you exactly what is going on.
I don't think so... because... I did a test also in Flex 3 with Flex Builder 3 and when I put some controls as child of my custom component using MXML the IDE in the design mode get an error... something like "Error: can't add display object to...."
So, I think that we have to use AS.