Revision: 3909 http://vexi.svn.sourceforge.net/vexi/?rev=3909&view=rev Author: clrg Date: 2010-10-08 14:34:39 +0000 (Fri, 08 Oct 2010)
Log Message: ----------- Fix memory leak in dynamic tables (good spot Jeff) Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t 2010-10-08 02:22:07 UTC (rev 3908) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t 2010-10-08 14:34:39 UTC (rev 3909) @@ -58,29 +58,15 @@ thisbox.setFilter = static.bodyNotSet; thisbox.setCompoundFilter = static.bodyNotSet; - - // dynmamic mode only (fetchData set) - thisbox.rowtemplate = .row; - thisbox.rowheight = rowtemplate..rowheight; - - var rowheightWrite = function(v) { cascade = v; rowheight = v; } - rowtemplate..rowheight ++= rowheightWrite; - /***********************\ * Dynamic table stuff * \***********************/ - thisbox.createRow = function() { return rowtemplate(vexi.box); } + thisbox.createRow = function() { return new rowtemplate(); } /** set the row template to use for new rows in loadData() */ thisbox.rowtemplate ++= function(t) { - if (rowtemplate) { - rowtemplate..rowheight --= rowheightWrite; - } cascade = t; - if (rowtemplate) { - rowtemplate..rowheight ++= rowheightWrite; - } rowheight = rowtemplate..rowheight; } @@ -315,6 +301,9 @@ return; } // init dynamic stuff + if (rowtemplate==null) { + rowtemplate = .row; + } fakeviewport = static.new_fakeviewport(); realviewport = th_bodyport; realviewport.shrink = false; 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