2003/10/31 09:50:08
[org.ibex.core.git] / src / org / xwt / Template.java
index e7e72b5..1b2d9b6 100644 (file)
@@ -97,7 +97,7 @@ public class Template {
         if (staticscript == null) return staticScope;
         JS.CompiledFunction temp = staticscript;
         staticscript = null;
-        temp.call(new JS.Array(), staticScope);
+        new JS.Thread(temp, staticScope).resume();
         return staticScope;
     }
     
@@ -124,7 +124,7 @@ public class Template {
             b.put(b.numChildren(), kid);
         }
 
-        if (script != null) script.call(new JS.Array(), pis);
+        if (script != null) new JS.Thread(script, pis).resume();
 
         for(int i=0; keys != null && i<keys.length; i++)
             if (vals[i] instanceof String && ((String)vals[i]).charAt(0) == '$') b.put(keys[i], pis.get(vals[i]));
@@ -354,13 +354,11 @@ public class Template {
             if (super.has(key)) return super.get(key);
             if (key.equals("xwt")) return xwt;
             if (key.equals("static")) return myStatic;
-            if (Box.SpecialBoxProperty.specialBoxProperties.get(key.toString()) != null) return getParentScope().get(key);
-            throw new JS.Exn("must declare " + key + " before using it!");
+            return super.get(key);
         }
         public void put(Object key, Object val) {
             if (super.has(key)) super.put(key, val);
-            else if (Box.SpecialBoxProperty.specialBoxProperties.get(key.toString()) != null) getParentScope().put(key, val);
-            else throw new JS.Exn("must declare " + key + " before using it!");
+            super.put(key, val);
         }
     }