X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FJSTrap.java;h=56a076ab8de55f9009c2fe85cf8e344f814b0b77;hb=0b0673bbc7f06c5d5418d5ab7ad5961a464e2de0;hp=baa02efba00a7ea9bf88b6bf8c153f49f6d475e5;hpb=67eeff476179a91ae930ea89cbecde22132ca532;p=org.ibex.core.git diff --git a/src/org/xwt/js/JSTrap.java b/src/org/xwt/js/JSTrap.java index baa02ef..56a076a 100644 --- a/src/org/xwt/js/JSTrap.java +++ b/src/org/xwt/js/JSTrap.java @@ -13,10 +13,10 @@ import java.io.*; */ public class JSTrap { - private JSTrappable trapee = null; ///< the box on which this trap was placed + JSTrappable trapee = null; ///< the box on which this trap was placed JSFunction f = null; ///< the function for this trap - private JSTrap next = null; ///< the next trap down the trap stack - private Object name = null; ///< the property that the trap was placed on + JSTrap next = null; ///< the next trap down the trap stack + Object name = null; ///< the property that the trap was placed on private JSTrap(JSTrappable b, String n, JSFunction f, JSTrap nx) { trapee = b; name = n; this.f = f; this.next = nx; } @@ -38,17 +38,14 @@ public class JSTrap { public static interface JSTrappable { public abstract JSTrap getTrap(Object key); public abstract void putTrap(Object key, JSTrap trap); - - /** puts to this value using an unpauseable context, triggering any traps */ - public abstract void putAndTriggerTraps(Object key, Object value); + public abstract void putAndTriggerJSTraps(Object key, Object value); } - // FIXME: cascadeHappened gets set, but autocascade does not happen static class JSTrapScope extends JSScope { JSTrap t; Object val = null; boolean cascadeHappened = false; - public JSTrapScope(JSTrap t, Object val) { this.t = t; this.val = val; } + public JSTrapScope(JSScope parent, JSTrap t, Object val) { super(parent); this.t = t; this.val = val; } public Object get(Object key) { if (key.equals("trapee")) return t.trapee; if (key.equals("trapname")) return t.name;