Hi Thomas,

I think the best interface for my needs would be to have a method 
releaseChildControl which simply removes the childControl from the child 
control array. Quite the opposite what method 
qx.ui.coreWidget._createChildControl does.

An additional parameter to remove would not fit here because the child 
control is not necessarily the direct child of the controlling widget.

So the call stack to decouple the child (table) control from the control 
would be:

     control.releaseChildControl ('table');
     control.remove(table);
     table.destroy();

I'm not quite shure about the method naming.

What do you think?

I'd like to create a patch along with the bug report. Is this OK?

Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH


Am 24.10.2012 18:18, schrieb thron7:
> Hi Dietrich,
>
> I think you're close. The typical .remove() method really means that,
> remove the child widget from the parent control. But nothing is
> destroyed as there might be further references to the child that are
> still alive. When the parent is disposed it calls _disposeChildControl
> (via Widget), which in turn calls .destroy. So I figure
> _disposeChildControl should suffice in your context, in order to avoid
> leaks.
>
> I guess the automatic handling of childControls is more geared towards
> compound controls where the child controls have the same life cycle as
> the parent. If you decouple the life cycles then it's hard to know for
> the compound control if you intend to further work with removed child or
> not, and you have to do the cleanup yourself. If you can think of a nice
> API for this (e.g. an optional parameter to .remove()), feel free to
> open a bug for it.
>
> T.
>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to