2003/11/17 01:53:25
[org.ibex.core.git] / src / org / xwt / XMLRPC.java
index 43654c7..efcccf7 100644 (file)
@@ -58,7 +58,7 @@ class XMLRPC extends JSCallable {
      *  stack to the last null, replace it with a NativeJSArray, and
      *  insert into it all elements above it on the stack.
      *
-     *  If a <struct> tag is encountered, a JSObject is pushed
+     *  If a <struct> tag is encountered, a JSect is pushed
      *  onto the stack. If a <name> tag is encountered, its CDATA is
      *  pushed onto the stack. When a </member> is encountered, the
      *  name (second element on stack) and value (top of stack) are
@@ -82,7 +82,7 @@ class XMLRPC extends JSCallable {
         public void startElement(XML.Element c) {
             content.reset();
             if (c.localName.equals("fault")) fault = true;
-            else if (c.localName.equals("struct")) objects.setElementAt(new JSObj(), objects.size() - 1);
+            else if (c.localName.equals("struct")) objects.setElementAt(new JS(), objects.size() - 1);
             else if (c.localName.equals("array")) objects.setElementAt(null, objects.size() - 1);
             else if (c.localName.equals("value")) objects.addElement("");
         }
@@ -128,7 +128,7 @@ class XMLRPC extends JSCallable {
                                                                     Double.valueOf(s.substring(15, 17)).doubleValue(),
                                                                     (double)0
                                                                     );
-                    nd.jsJSFunction_setTime(JSDate.internalUTC(date));
+                    nd.setTime(JSDate.internalUTC(date));
                     objects.setElementAt(nd, objects.size() - 1);
                     
                 } catch (Exception e) {
@@ -356,6 +356,11 @@ class XMLRPC extends JSCallable {
         return objects.elementAt(0);
     }
 
+    public final Object call(Object a0, Object a1, Object a2, Object[] rest, int nargs) throws JS.Exn {
+        JSArray args = new JSArray();
+        for(int i=0; i<nargs; i++) args.addElement(i==0?a0:i==1?a1:i==2?a2:rest[i-3]);
+        return call(args);
+    }
     public final Object call(final JSArray args) throws JS.Exn {
         final Callback callback = JSContext.pause();
         new java.lang.Thread() {