Revision: 2613 http://vexi.svn.sourceforge.net/vexi/?rev=2613&view=rev Author: clrg Date: 2007-11-23 09:51:56 -0800 (Fri, 23 Nov 2007)
Log Message: ----------- Minor lib cleanups (remove redundant code, tidy up syntax) Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/selectable.t trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/check.t trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/selectable.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/selectable.t 2007-11-23 15:22:08 UTC (rev 2612) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/selectable.t 2007-11-23 17:51:56 UTC (rev 2613) @@ -50,11 +50,7 @@ </ui:box> /** clickable integration */ - static.actionWrite = function(v) { - if (trapee.enabled) - trapee.selected = true; - cascade = v; - } + static.actionWrite = function(v) { trapee.selected = true; cascade = v; } /** integration with clickable and focusable */ static.focusableRead = function() { Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/check.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/check.t 2007-11-23 15:22:08 UTC (rev 2612) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/check.t 2007-11-23 17:51:56 UTC (rev 2613) @@ -10,11 +10,11 @@ <selectable /> --> <ui:box> - action ++= static.actionFunc; + action ++= static.actionWrite; </ui:box> // FIXME: is in selectable - to be removed eventually from here - static.actionFunc = function(v) { trapee.selected = !trapee.selected; cascade = v; } + static.actionWrite = function(v) { trapee.selected = !trapee.selected; cascade = v; } </vexi> Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t 2007-11-23 15:22:08 UTC (rev 2612) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/splitpane.t 2007-11-23 17:51:56 UTC (rev 2613) @@ -58,9 +58,13 @@ var dragStart = function(v) { cascade = v; // make sure we always have a master - if (!master) - for (var i=0; th_holding.numchildren>i; i+=2) + if (!master) { + for (var i=0; th_holding.numchildren>i; i+=2) { if (!th_holding[i][shr]) master = th_holding[i]; + break; + } + } + // no volunteers? conscript! if (!master) master = th_holding[0]; // the current divider being moved var cur = th_holding.indexof(trapee); 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 2007-11-23 15:22:08 UTC (rev 2612) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/table.t 2007-11-23 17:51:56 UTC (rev 2613) @@ -72,9 +72,9 @@ var rowheight = rowinstance.height; thisbox.fetchData = null; - /********************** - Dynamic table stuff * - **********************/ + /***********************\ + * Dynamic table stuff * + \***********************/ var createRow = function() { var r = rowtemplate(vexi.box); @@ -82,8 +82,7 @@ } /** set the row template to use for new rows in loadData() */ - thisbox.setRowTemplate = function(t) - { + thisbox.setRowTemplate = function(t) { rowtemplate = t; rowinstance = t(vexi.box); rowinstance.forcereflow(); @@ -115,6 +114,7 @@ } var callFetchData = function() { + vexi.log.info("callFetchData"); var start = vexi.math.floor((-th_bodyview.y) / rowheight); var count = vexi.math.ceil(th_bodyport.height / rowheight) + 1; /* sanity control */ @@ -128,7 +128,7 @@ } /** foces fetchData to be called with the current table settings */ - thisbox.forceFetchData = function() { callFetchData(); } + thisbox.forceFetchData = function(v) { callFetchData(); return; } var delayedCallFetchData = static.new_delayedFunction(100, callFetchData); @@ -163,15 +163,16 @@ /** used for setting up dynamic tables */ thisbox.rowcount ++= function(v) { - initAsDynamic(); + if (fetchData == null) throw "Define fetchData before assigning rowcount"; if (v == rowcount) return; th_bodyview.height = rowheight * v; rowcount = v; + delayedCallFetchData(); } - /************************* - END Dynamic table stuff * - **************************/ + /***************************\ + * END Dynamic table stuff * + \***************************/ /** reset the contents of this table */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn