Revision: 3470 http://vexi.svn.sourceforge.net/vexi/?rev=3470&view=rev Author: clrg Date: 2009-04-02 15:54:52 +0000 (Thu, 02 Apr 2009)
Log Message: ----------- Clean up - read-only handled by JS.Immutable - make DistanceTo to/from writable Modified Paths: -------------- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp =================================================================== --- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2009-04-01 16:34:36 UTC (rev 3469) +++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2009-04-02 15:54:52 UTC (rev 3470) @@ -1181,14 +1181,6 @@ //#end return super.get(key); } - public void put(JS key, JS value) throws JSExn { - //#switch (JSU.toString(key)) - case "inside": isReadOnly(key); - case "x": isReadOnly(key); - case "y": isReadOnly(key); - //#end - super.put(key, value); - } public JS type() { return SC_mouse; } } @@ -1207,12 +1199,14 @@ return super.get(key); } public void put(JS key, JS value) throws JSExn { - //#switch (JSU.toString(key)) - case "from": isReadOnly(key); - case "to": isReadOnly(key); - case "x": isReadOnly(key); - case "y": isReadOnly(key); - //#end + try { + //#switch (JSU.toString(key)) + case "from": this.from = (Box)value; return; + case "to": this.to = (Box)value; return; + //#end + } catch(ClassCastException cce) { + throw new JSExn("Cannot put non-Box to property '"+JSU.toString(key)+"' on DistanceTo"); + } super.put(key, value); } public JS type() { return SC_distanceto; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn