Dave,

from Tobi Oetiker:

Use the following mixin (include it in Application.js, then you can use it
everywhere):

            // Allow destruction of all children of a widget
            qx.Class.include(qx.ui.core.Widget, YOURAPP.ui.MDestroyAll);

The mixin is attached, just put the right name in there (replace YOURAPP
both in the mixin and in the include statement above).

Then you can do:

        widget.destroyAll();
        widget.destroy();

Or you could add a function in the mixin doing both ...


Cheers,
Fritz

On Mon, 22 Nov 2010, Dave Baggett wrote:


What is the right thing to do to permanently dispose of a widget? Should I be
called widget.destroy()? I ask because when I call that on a container it
seems to leave the container's children around. Should I be doing a
container.removeAll() and hook the _afterRemoveChild callback to do a
.destroy() in there?

Basically, I want to make a whole bunch of widgets disappear so I can
reclaim their memory.

Dave



--
Oetiker+Partner AG              tel: +41 62 775 99 03 (direct)
Fritz Zaucker                        +41 62 775 99 00 (switch board)
Aarweg 15                            +41 79 675 06 30 (mobile)
CH-4600 Olten                   fax: +41 62 775 99 05
Schweiz                         web: www.oetiker.ch

Attachment: MDestroyAll.js
Description: MDestroyAll

------------------------------------------------------------------------------
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

Reply via email to