2003/11/18 10:47:26
[org.ibex.core.git] / src / org / xwt / js / JSArray.java
index c918bda..069edc0 100644 (file)
@@ -5,8 +5,9 @@ import org.xwt.util.*;
 import java.io.*;
 import java.util.*;
 
+// FIXME: review, use redblacktrees
 /** A JavaScript JSArray */
-public class JSArray extends JSCallable {
+public class JSArray extends JS {
     private Vec vec = new Vec();
     public JSArray() { }
     public JSArray(int size) { vec.setSize(size); }
@@ -54,7 +55,7 @@ public class JSArray extends JSCallable {
         return super.callMethod(method, a0, a1, a2, rest, nargs);
     }
         
-    public Object get(Object key) throws JS.Exn {
+    public Object get(Object key) throws JSExn {
         if (key instanceof Number) {
             int i = intVal(key);
             if (i == Integer.MIN_VALUE) return super.get(key);
@@ -152,9 +153,9 @@ public class JSArray extends JSCallable {
         }
     };
     private Object sort(Object tmp) {
-        if(tmp instanceof JSCallable) {
+        if(tmp instanceof JS) {
             final JSArray funcArgs = new JSArray(2);
-            final JSCallable jsFunc = (JSCallable) tmp;
+            final JS jsFunc = (JS) tmp;
             vec.sort(new Vec.CompareFunc() {
                 public int compare(Object a, Object b) {
                     funcArgs.setElementAt(a,0);