Comments:
Nice post u have here :D Added to my RSS reader
Does this work in Flex 3? I get an error:
Error: Multiple sets of visual children have been specified for this component (base component definition and derived component definition).
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::setDocumentDescriptor()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:3421]
Hi Jesse,
I am using Flex 3.2.0 and works fine. Also worked in previous build 3.1.X.
Good luck!
I cannot get this to work beyond the first generation: a sub-class of this component cannot incrementally add children, even if I duplicate the DefaultProperty protocol.
I’m coming from Delphi’s visual component inheritance, and this seems a bit rough.
Cheers
Hi Richard,
never tried to use this further on a subclass or child of the main component.
Notice that this is just a workaround, the best solution I could find searching the net.
I have been using this without problems always facing it the same way:
1) Create a “complex” component with a desired nesting point for the child MX components
2) Use it as a regular component, being able to nest MX components such as buttons, text fields, etc. on the desired nesting point
Notice that the nested elements will be layouted according to your nesting element definitions (vertical, horizontal, absolute, …)
Once again, never tried to add a second nesting level, although I guess it should work as well.
Cheers,
Thanks man! Helped me a lot… Just what i was looking for.
nice! i’m gonna make my own journal
exactly what i was looking for and really clearly explained. nice to actually learn something!!!!
thanks for doin that :D
Thanks, this was just what i needed ;-))
Amazing! Thanks you.
I had some issues when I tried to add a mx:Form component to this implementation. I resolved them by doing something like this:
It works great! Thanks.
Thanks for sharing this Brent!
Love to see this post is helping some people…
Leave a comment