Good example. Here is the solution to that one. DON'T call
super.createChildren()... here is why:
TreeItemRender extends UIComponent.
UIComponent has this for createChildren:
protected function createChildren():void
{
}
Calling it does nothing, you don't need to call it.
I'm going to go out a limb here and say that UIComponent will never do
anything. It really should only be used by implementers. I say this
because UIComponent calls createChildren, if it needed to do something
before the implementation of it then it should do it before it calls it.
Any other examples?
Paul
--- In [email protected], "Anthony Lee" <[EMAIL PROTECTED]>
wrote:
>
> > > Can anyone provide any real world examples?
> >
>
>
>
>
> Sure.
>
> I want to extend TreeItemRender, it's a 500 hundred line class so
I'd rather
> not rewrite it. The only available text presentation object in the
class is
> a UITextField which is instantiated in the createChildren method. I
want to
> replace it a VBOX then call grandparent.createChildren(). If I call
> super.createChildren() then I have a conflict.
>
> I don't know what the grandparent would do with that call, I don't
think I
> should have to. It would just be a whole lot more efficient if you could
> override a method and not loss access to it place in the scheme of
things.
>
> tonio
>