Hi Jonathan,
Hello skar,


you guess you mean Object.dispose() and delete? Widget.destroy() removes
this widget from its parent and disposes it.

Object.dispose() removes the object from the object registry and removes all
event listeners on this object and tries to remove as much other references
(DOM) as possible. delete just removes the reference of the object so that
the garbage collector can free the memory this object had used. The entry in
the registry as well as all references will still be there!

Please do always use dispose() if you want to get rid of widgets.
Well, instead of "delete obj" I did a obj.dispose and I get this error now:

obj.__element is null
anonymous()Element.js (line 283)
anonymous()Manager.js (line 97)
anonymous(function(), function())Manager.js (line 175)
anonymous()Manager.js (line 140)
anonymous(Window dev, qx.event.type.Data[5p] $$hash=5p _type=useraction _target=window, "useraction")Direct.js (line 99)
wrappedFunction()Interface.js (line 458)
anonymous(Window dev, qx.event.type.Data[5p] $$hash=5p _type=useraction _target=window)Manager.js (line 815) anonymous(Window dev, "useraction", function(), ["mouseup" 0=mouseup])Registration.js (line 294) anonymous(mouseup clientX=483, clientY=125, "mouseup", label)Mouse.js (line 199)
anonymous(mouseup clientX=483, clientY=125)Mouse.js (line 378)
anonymous()GlobalError.js (line 92)
anonymous(mouseup clientX=483, clientY=125)Function.js (line 378)
obj.__element.style.display = obj.__visible ? "" : "none";\n
The object in question is a modal window, which I close and in a close event listener, I do a "window.dispose()". Except for this error, the app works fine and the window gets deleted too, as the variable which holds the window object's reference says "undefined" now after the dispose. The firebug console says:

test_app.OPAdd[99] $$hash=99 __containerElement=qx.html.Element[9a]
test_app.OPAdd[undefined] $$useinit_focusable=true $$useinit_selectable=true
The first line is before the close+dispose and the second after.

cheers,
skar.

--
--
The life so short, the craft so long to learn.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to