2003/11/16 08:28:10
[org.ibex.core.git] / src / org / xwt / js / JSTrap.java
index baa02ef..56a076a 100644 (file)
@@ -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;