This content has been marked as final. Show 3 replies
Flex is a framework, with lots of integration and rules between its parts in order to provide the functionality it does. The run-time displayList dom, for example.
One basic set of rules is:
Navigator children must be containers
Container children must be IUIComponets
UIComponent children can be anything
You can make a "custom container", just start with UIComonent. But that container will not have the functionality of Flex Container class.
The lower you start in the class hierarchy, the more work you have to do yourself.
So a question like "Why not extend Container" is valid.
So I guess what I'm wondering is how you make your custom container class (that doesn't extend Container), just out of curiosity. :)
look at the source code of already implemented containers that adobe engineers did
Now when I think about it, I think what I'm really curious about is the ctrl+space feature. How does flex editor know that a certain component only can have children of certain types? If I was to make my custom class, how can I make it only accept children of a certain type?
For example. And when I type "<" within "<myPack:MyClass>" and press ctrl+space, only MyOtherClass will be displayed. How would you do that?