2003/06/12 17:57:37
[org.ibex.core.git] / src / org / xwt / Resources.java
index be4eb99..c4e512e 100644 (file)
@@ -70,7 +70,7 @@ public class Resources {
 
     /** Load an archive from an inputstream. */
     public static synchronized void loadArchive(InputStream is) throws IOException { loadArchive(is, 0, null); }
-    public static synchronized void loadArchive(InputStream is, final int length, final JS.Function callback) throws IOException {
+    public static synchronized void loadArchive(InputStream is, final int length, final JS.Callable callback) throws IOException {
 
         // random placeholder
         Object thisArchive = new Object();
@@ -86,10 +86,10 @@ public class Resources {
                     int ret = super.read(b, off, len);
                     if (clear && callback != null) {
                         clear = false;
-                        ThreadMessage.newthread(new JS.Function(-1, "java", null, null) {
-                                public Object _call(JS.Array args_) throws JS.Exn {
+                        ThreadMessage.newthread(new JS.Callable() {
+                                public Object call(Array args_) throws JS.Exn {
                                     try {
-                                       JS.Array args = new JS.Array();
+                                       Array args = new Array();
                                        args.addElement(new Double(bytesDownloaded));
                                        args.addElement(new Double(length));
                                         callback.call(args);