Revision: 3093
http://vexi.svn.sourceforge.net/vexi/?rev=3093&view=rev
Author: clrg
Date: 2008-08-20 02:13:55 +0000 (Wed, 20 Aug 2008)
Log Message:
-----------
Allow array-like iteration over an orderedlist
Modified Paths:
--------------
trunk/widgets/org.vexi.widgets/src/vexi/util/orderedarray.t
trunk/widgets/org.vexi.widgets/src/vexi/util/orderedlist.t
Modified: trunk/widgets/org.vexi.widgets/src/vexi/util/orderedarray.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/vexi/util/orderedarray.t 2008-08-19
11:48:24 UTC (rev 3092)
+++ trunk/widgets/org.vexi.widgets/src/vexi/util/orderedarray.t 2008-08-20
02:13:55 UTC (rev 3093)
@@ -95,16 +95,16 @@
thisbox.Children ++= function() { return elements[trapname]; }
/** no manual insertion allowed */
- thisbox.Children ++= function(v) { throw "use insert(v) to insert
items into orderedarray"; }
+ thisbox.Children ++= function(v) { throw "use insert(v) to insert
items into orderedarray"; return; }
/** returns the length of the list */
thisbox.length = function() { return elements.length; }
/** inserts argument v into the list */
- thisbox.insert = function(v) { static.elementInsert(v, elements);
cascade = null; }
+ thisbox.insert = function(v) { static.elementInsert(v, elements); }
/** removes argument v from the list */
- thisbox.remove = function(v) { static.elementRemove(v, elements);
cascade = null; }
+ thisbox.remove = function(v) { static.elementRemove(v, elements); }
/** returns the position of v in the list */
thisbox.position = function(v) { return static.elementPosition(v,
elements); }
Modified: trunk/widgets/org.vexi.widgets/src/vexi/util/orderedlist.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/vexi/util/orderedlist.t 2008-08-19
11:48:24 UTC (rev 3092)
+++ trunk/widgets/org.vexi.widgets/src/vexi/util/orderedlist.t 2008-08-20
02:13:55 UTC (rev 3093)
@@ -38,6 +38,12 @@
/** compares two numbers */
var compNumber = function(a, b) { return a > b; }
+ /** mirror elements */
+ thisbox.Children ++= function() { return vals[trapname]; }
+
+ /** no manual insertion allowed */
+ thisbox.Children ++= function(v) { throw "use insert(v) to insert
items into orderelist"; return; }
+
/** returns true if a key is already present in the list */
thisbox.contains = function(v) { return (keyrefs[v] != null); }
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn