X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fcore%2FTemplate.java;h=62e70936f878369ec7ae4392d062b8ce7e7a5ed3;hp=a59e99d76cf0c77c7735e3202e252ac864790a3e;hb=HEAD;hpb=5de67c2837ce1767fff9b352c4960ddd8df4d987 diff --git a/src/org/ibex/core/Template.java b/src/org/ibex/core/Template.java index a59e99d..62e7093 100644 --- a/src/org/ibex/core/Template.java +++ b/src/org/ibex/core/Template.java @@ -66,12 +66,12 @@ public class Template { apply(b, null); } catch (IOException e) { b.clear(Box.VISIBLE); - b.mark_for_repack(); + b.RECONSTRAIN(); Log.warn(this, e); throw new JSExn(e.toString()); } catch (JSExn e) { b.clear(Box.VISIBLE); - b.mark_for_repack(); + b.RECONSTRAIN(); Log.warn(this, e); throw e; } @@ -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 {