X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FIbex.java;h=8d86da7b933235c2cdc0b87542b3137d6b4d1329;hb=2c8a770c56b8945afc27b0122c610bdfd84687de;hp=51101271977ac50f9452c009de2c9054a2e5e571;hpb=2be4954059276cd5693de78865de16cd9965307b;p=org.ibex.core.git diff --git a/src/org/ibex/Ibex.java b/src/org/ibex/Ibex.java index 5110127..8d86da7 100644 --- a/src/org/ibex/Ibex.java +++ b/src/org/ibex/Ibex.java @@ -213,7 +213,6 @@ public final class Ibex extends JS.Cloneable { public static void sleep(final int i) throws JSExn { try { final JS.UnpauseCallback callback = JS.pause(); - final long currentTime = System.currentTimeMillis(); // FEATURE use a single sleeper thread new Thread() { public void run() { try { Thread.sleep(i); } catch (InterruptedException e) { } @@ -301,7 +300,7 @@ public final class Ibex extends JS.Cloneable { } } - // FEATURE: move this into builtin.ibex + // FEATURE: move this into builtin.xwar public Blessing bless(JS b) { return new Ibex.Blessing((JS.Cloneable)b, this, null, null); } public static class Blessing extends JS.Clone { private Ibex ibex; @@ -336,7 +335,8 @@ public final class Ibex extends JS.Cloneable { public JSScope getStatic() { try { // FIXME background? - if (t == null) t = Template.buildTemplate(Stream.getInputStream(parent.get(parentkey + ".ixt")), ibex); + if (t == null) + t = Template.buildTemplate(parentkey + ".t", Stream.getInputStream(parent.get(parentkey + ".t")), ibex); return t.staticScope; } catch (Exception e) { Log.error(this, e); @@ -348,6 +348,7 @@ public final class Ibex extends JS.Cloneable { if (nargs == 9999) return t; if (nargs != 1) throw new JSExn("FIXME can only call with one arg"); getStatic(); + if (t == null) throw new JSExn("No such template " + parentkey); t.apply((Box)a); return a; }