minor bug fixes from moving interfaces
[org.ibex.js.git] / src / org / ibex / js / Test.java
index fe138bc..b5d8b8d 100644 (file)
@@ -13,9 +13,9 @@ public class Test extends JS.Obj {
     
     public static void main(String[] args) throws Exception {
         if(args.length == 0) { System.err.println("Usage Test filename"); System.exit(1); }
-        JS f = JS.fromReader(args[0],1,new FileReader(args[0]));
+        JS f = Script.fromReader(args[0],1,new FileReader(args[0]));
         System.out.println(((JSFunction)f).dump());
-        JS s = new JS.O();
+        JS s = new JS.Obj();
         s.put(Script.S("sys"),new Test());
         f = Script.cloneWithNewGlobalScope(f,s);
         //JS ret = f.call(null,null,null,null,0);
@@ -67,12 +67,12 @@ public class Test extends JS.Obj {
     }
     
     public JS callMethod(JS method, JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
-        if(!JS.isString(method)) return null;
+        if(!Script.isString(method)) return null;
         if("print".equals(Script.toString(method))) {
             System.out.println(Script.str(a0));
             return null;
         }
-        if("clone".equals(Script.toString(method))) return a0 == null ? null : a0.jsclone();
+        if("clone".equals(Script.toString(method))) return a0 == null ? null : new JS.Clone(a0);
         if("firethis".equals(Script.toString(method))) {
             String action = Script.toString(a0);
             JS target = a1;