Revision: 2454 http://vexi.svn.sourceforge.net/vexi/?rev=2454&view=rev Author: mkpg2 Date: 2007-10-14 09:18:25 -0700 (Sun, 14 Oct 2007)
Log Message: ----------- Tidying up. Modified Paths: -------------- trunk/core/org.ibex.js/src/org/ibex/js/JS.jpp Modified: trunk/core/org.ibex.js/src/org/ibex/js/JS.jpp =================================================================== --- trunk/core/org.ibex.js/src/org/ibex/js/JS.jpp 2007-10-14 15:58:28 UTC (rev 2453) +++ trunk/core/org.ibex.js/src/org/ibex/js/JS.jpp 2007-10-14 16:18:25 UTC (rev 2454) @@ -114,7 +114,6 @@ } // Non-Trap methods forward to the clonee public JS unclone() { return clonee.unclone(); } - public boolean equals(Object o) { return (!(o instanceof JS))?false: clonee.equals(((JS)o).unclone()); } public Keys keys() throws JSExn { return clonee.keys(); } public JS get(JS k) throws JSExn { return clonee.get(k); } public void put(JS k, JS v) throws JSExn { clonee.put(k, v); } @@ -138,15 +137,7 @@ }catch(JSExn e){ wasException = true; throw e; - } - /* REMARK can only have JSExns ... TODO remove later - catch(Exception e){ - wasException = true; - if(e instanceof JSExn) - throw (JSExn)e; - else - throw new JSExn(e.getMessage()); - }*/finally{ + }finally{ Thread.runAfterPut(wasException); } }else{ @@ -221,30 +212,13 @@ public JS type() { return SC_object;} public JS get(JS key) throws JSExn { return (JS)super.get(key, 0); } -// REMARK __invoke__ method, unsure whether to include so commented out -// Allows creation of object that can handle any method call, useful if -// trying to test code that hasn't been written with testing in mind. -/* - public JS get(JS key) throws JSExn { - JS r = (JS)super.get(key, 0); - if(r==null && super.get(JSU.S("__invoke__"),0)!=null) return METHOD; - return r; - } - - public JS call(JS method, JS[] args) throws JSExn { - JS __invoke__ = (JS)super.get(JSU.S("__invoke__"),0); - if(__invoke__!=null && __invoke__ instanceof JSFunction){ - return __invoke__.call(null, new JS[]{method,new JSArray(args)}); - } - throw new JSExn(method==null ? "cannot call a " + getClass().getName() : "method not found: " + JSU.toString(method)); } -*/ - public void put(JS key, JS val) throws JSExn { if(val==null){ super.remove(key, 0); return;} super.put(key, val, 0); } public JS getAndTriggerTraps(JS key) throws JSExn { + // FEATURE 'Properties' trap Trap t = (Trap)super.get(key, 1); return t == null || (t = t.read()) == null ? (JS)get(key) : Thread.runInCurrent(t); 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: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn