Btw. I just aded a bug to enhance the removeAll method to return the removed
children:
http://bugzilla.qooxdoo.org/show_bug.cgi?id=4367
<http://bugzilla.qooxdoo.org/show_bug.cgi?id=4367>
Am 25.11.2010 um 08:40 schrieb Martin Wittemann:
Hey,
What would be the point to keep widget instances when the container is dispose ?
A widget can't belongs to several container, so disposing the container should
mean disposing the widgets inside.
I don't see that the widget belongs to the container. The widget belongs to the
instance created it. The container is only handling references.
Imagine that:
// setup
this.__w = new Widget();
this.__c = new Container();
this.__c.add(this.__w);
// On some change...
this.__c.dispose();
this.__c = new Container();
this.__c.add(this.__w);
This looks like a reasonable way to code something, which would not work with
your described behavior.
That is not linked to previous point, but container.dispose could do the
qx.util.DisposeUtil.disposeArray(container.removeAll())
That way, a simple call to dispose on any GUI node will dispose the sub tree
Sure, it may be simpler in that use case but harder in the case you want to
keep the widget because you need to remove it before disposing the container.
Therefore, I would stick to the rule that the one created the object is
responsible for disposing.
Best,
Martin
<ATT00001..txt><ATT00002..txt>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel