2003/11/03 06:32:55
[org.ibex.core.git] / src / org / xwt / Template.java
index bf88c4f..a81f150 100644 (file)
@@ -32,7 +32,7 @@ public class Template {
     private Vec children = new Vec();  ///< during XML parsing, this holds the list of currently-parsed children; null otherwise
     private int numunits = -1;         ///< see numUnits(); -1 means that this value has not yet been computed
 
-    private JS.CompiledFunction script = null;       ///< the script on this node
+    private Function script = null;       ///< the script on this node
     private String fileName = "unknown";             ///< the filename this node came from; used only for debugging
     private Vec preapply = new Vec();                ///< templates that should be preapplied (in the order of application)
 
@@ -40,7 +40,7 @@ public class Template {
     // Instance Members that are only meaningful on root Template //////////////////////////////////////
 
     private JS.Scope staticScope = null;             ///< the scope in which the static block is executed
-    private JS.CompiledFunction staticscript = null; ///< the script on the static node of this template, null already performed
+    private Function staticscript = null; ///< the script on the static node of this template, null already performed
 
 
     // Only used during parsing /////////////////////////////////////////////////////////////////
@@ -95,9 +95,9 @@ public class Template {
     JS.Scope getStatic() {
         if (staticScope == null) staticScope = new JS.Scope(null);
         if (staticscript == null) return staticScope;
-        JS.CompiledFunction temp = staticscript;
+        Function temp = staticscript;
         staticscript = null;
-        new JS.Context(temp, staticScope, null).resume(null);
+        new JS.Context(temp, staticScope).resume();
         return staticScope;
     }
     
@@ -126,7 +126,7 @@ public class Template {
             b.put(b.numChildren(), kid);
         }
 
-        if (script != null) new JS.Context(script, pis, null).resume(null);
+        if (script != null) new JS.Context(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]));
@@ -278,8 +278,8 @@ public class Template {
             }
         }
 
-        private JS.CompiledFunction parseScript(boolean isstatic) {
-            JS.CompiledFunction thisscript = null;
+        private Function parseScript(boolean isstatic) {
+            Function thisscript = null;
             try {
                 thisscript = JS.parse(t.fileName + (isstatic ? "._" : ""), t.content_start, new StringReader(t.content.toString()));
             } catch (IOException ioe) {