Revision: 1943
          http://svn.sourceforge.net/vexi/?rev=1943&view=rev
Author:   mkpg2
Date:     2007-07-08 07:59:58 -0700 (Sun, 08 Jul 2007)

Log Message:
-----------
Fix/decision. Putting null to a property removes the value.

Modified Paths:
--------------
    core/branches/vexi2/org.ibex.js/src/org/ibex/js/JS.jpp
    core/branches/vexi2/org.ibex.util/src/org/ibex/util/Basket.java

Modified: core/branches/vexi2/org.ibex.js/src/org/ibex/js/JS.jpp
===================================================================
--- core/branches/vexi2/org.ibex.js/src/org/ibex/js/JS.jpp      2007-07-07 
17:14:53 UTC (rev 1942)
+++ core/branches/vexi2/org.ibex.js/src/org/ibex/js/JS.jpp      2007-07-08 
14:59:58 UTC (rev 1943)
@@ -212,7 +212,7 @@
                                }
                                protected JS remove(JS key) throws JSExn {
                                        JS r = Obj.this.get(key);
-                       Obj.super.remove(key);
+                       Obj.super.remove(key,0);
                        return r;
                                }
                                protected JS size() throws JSExn {return 
JSU.N(JS.Obj.this.size());}
@@ -239,7 +239,10 @@
             throw new JSExn(method==null ? "cannot call a " + 
getClass().getName() : "method not found: " + JSU.str(method)); }
 */
 
-        public void put(JS key, JS val) throws JSExn { super.put(key, val, 0); 
}
+        public void put(JS key, JS val) throws JSExn { 
+               if(val==null) super.remove(key, 0);
+               super.put(key, val, 0); 
+        }
 
         public JS getAndTriggerTraps(JS key) throws JSExn {
             Trap t = (Trap)super.get(key, 1);

Modified: core/branches/vexi2/org.ibex.util/src/org/ibex/util/Basket.java
===================================================================
--- core/branches/vexi2/org.ibex.util/src/org/ibex/util/Basket.java     
2007-07-07 17:14:53 UTC (rev 1942)
+++ core/branches/vexi2/org.ibex.util/src/org/ibex/util/Basket.java     
2007-07-08 14:59:58 UTC (rev 1943)
@@ -7,6 +7,7 @@
 import java.io.Serializable;
 import java.util.HashMap;
 
+
 public interface Basket extends Serializable {
     public boolean containsValue(Object object);
     public void clear();
@@ -220,6 +221,7 @@
         public Object put(Object key, Object val) { return put(key, val, 0); }
         public Object put(Object key, Object val, int whichval) { 
maps[whichval].put(key, val); return null; }
         public void remove(Object key) { for(int i=0; indexMultiple+1>i; i++) 
maps[i].remove(key); }
+        public void remove(Object key, int i) { maps[0].remove(key);}
         public int size() { return maps[0].size(); }
     }
 


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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to