make core compile with new js stuff and Task replacement class
[org.ibex.core.git] / src / org / ibex / core / Main.java
index d925bc0..d35def1 100644 (file)
@@ -101,9 +101,15 @@ public class Main {
 
         org.ibex.graphics.Surface.scarImage =
             Picture.load(new Stream.FromInputStream(Encode.JavaSourceCode.decode(Scar.data)),
-                         new Task() { public void perform() throws JSExn, UnknownHostException {
-                             if (Log.on) Log.info(Main.class, "invoking initial template");
-                             ibex.resolveString(startupTemplate, false).call(new Box(), null, null, null, 1);
+                         new Callable() {
+                             private JS[] callargs = new JS[1];
+                             public Object run(Object o) throws JSExn,UnknownHostException {
+                                 if (Log.on) Log.info(Main.class, "invoking initial template");
+                                 try {
+                                     callargs[0] = new Box(); 
+                                     ibex.resolveString(startupTemplate, false).call(callargs);
+                                 } finally { callargs[0] = null; }
+                                 return null;
                          } });
 
         Scheduler.init();