Revision: 3915 http://vexi.svn.sourceforge.net/vexi/?rev=3915&view=rev Author: jeffbuhrt Date: 2010-10-13 14:57:13 +0000 (Wed, 13 Oct 2010)
Log Message: ----------- Cleanup a box and all children boxes, also setting all fields to null. Calls an optional unload() function to allow cleanup of any traps set by the object. Added Paths: ----------- trunk/widgets/org.vexi.widgets/src/vexi/util/shreadboxes.t Added: trunk/widgets/org.vexi.widgets/src/vexi/util/shreadboxes.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/vexi/util/shreadboxes.t (rev 0) +++ trunk/widgets/org.vexi.widgets/src/vexi/util/shreadboxes.t 2010-10-13 14:57:13 UTC (rev 3915) @@ -0,0 +1,29 @@ +<!-- Copyright 2010 - see COPYING for details [LGPL] --> + +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.widget" + xmlns:layout="vexi.layout" xmlns:util="vexi.util"> + <meta:doc> + <author>Jeff Buhrt</author> + <name>Cleanup a box hierarchy</name> + </meta:doc> + + /** Cleanup a box and all children boxes, also setting all fields to null. + * Calls an optional unload() function to allow cleanup of any traps set by the object. + */ + static.shreadBoxes = function(abox) { + if (abox.numchildren > 1) { + for (var b = abox.numchildren-1; b >= 0; b--) { + if (abox[b] != null) + shreadBoxes(abox[b]); + } + } + if (abox.unload != null) + abox.unload(); + for (var b in abox) + abox[b] = null; + abox.clear(); + } + + <ui:box /> + +</vexi> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn