2003/11/25 09:59:16
[org.ibex.core.git] / src / org / xwt / js / Interpreter.java
index fe118e5..5c7163b 100644 (file)
@@ -167,7 +167,7 @@ class Interpreter implements ByteCodes, Tokens {
                                 Trap t = ts.t.next;
                                 while (t != null && t.f.numFormalArgs == 0) t = t.next;
                                 if (t == null) {
-                                    ((JS)ts.t.trapee).put(t.name, ts.val);
+                                    ((JS)ts.t.trapee).put(ts.t.name, ts.val);
                                     if (pausecount > initialPauseCount) { pc++; return null; }   // we were paused
                                 } else {
                                     stack.push(o);
@@ -203,7 +203,7 @@ class Interpreter implements ByteCodes, Tokens {
                     throw je("tried to assign \"" + (val==null?"(null)":val.toString()) + "\" to the null key");
                 Trap t = null;
                 if (target instanceof JS) {
-                    t = ((JS)target).getTrap(val);
+                    t = ((JS)target).getTrap(key);
                     while (t != null && t.f.numFormalArgs == 0) t = t.next;
                 } else if (target instanceof Trap.TrapScope && key.equals("cascade")) {
                     Trap.TrapScope ts = (Trap.TrapScope)target;