remove JS.call(JS[]), JS.getInputStream()
[org.ibex.core.git] / src / org / ibex / core / Template.java
index a59e99d..c9fe9a3 100644 (file)
@@ -101,7 +101,7 @@ public class Template {
             b.putAndTriggerTraps(b.get(JSU.S("numchildren")), kid);
         }
 
-        if (script != null) JSU.cloneWithNewGlobalScope(script, pis).call(callempty);
+        if (script != null) JSU.cloneWithNewGlobalScope(script, pis).call(null, callempty);
 
         for(int i=0; keys != null && i < keys.length; i++) {
             if (keys[i] == null) continue;
@@ -162,7 +162,7 @@ public class Template {
         public TemplateHelper(String sourceName, JS s, Ibex ibex) throws XML.Exn, IOException, JSExn {
             this.sourceName = sourceName;
             this.ibex = ibex;
-            InputStream is = s.getInputStream();
+            InputStream is = JSU.getInputStream(s);
             Ibex.Blessing b = Ibex.Blessing.getBlessing(s).parent;
             while(b != null) {
                 if(b.parentkey != null) initial_uri = JSU.toString(b.parentkey) + (initial_uri.equals("") ? "" : "." + initial_uri);
@@ -173,7 +173,7 @@ public class Template {
             JS staticScript = parseScript(static_content, static_content_start);
             t.staticObject = new JS.Obj();
             JS staticScope = new PerInstantiationScope(null, ibex, null, t.staticObject);
-            if (staticScript != null) JSU.cloneWithNewGlobalScope(staticScript, staticScope).call(callempty);
+            if (staticScript != null) JSU.cloneWithNewGlobalScope(staticScript, staticScope).call(null, callempty);
         }
 
         private JS parseScript(StringBuffer content, int content_start) throws IOException {