hillion 02/03/07 07:23:12 Modified: sources/org/apache/batik/script/rhino WindowWrapper.java xdocs scriptFeatures.xml Log: Revision Changes Path 1.3 +5 -15 xml-batik/sources/org/apache/batik/script/rhino/WindowWrapper.java Index: WindowWrapper.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/script/rhino/WindowWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- WindowWrapper.java 7 Mar 2002 15:16:50 -0000 1.2 +++ WindowWrapper.java 7 Mar 2002 15:23:11 -0000 1.3 @@ -27,9 +27,11 @@ * This class wraps a Window object to expose it to the interpreter. * * @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a> - * @version $Id: WindowWrapper.java,v 1.2 2002/03/07 15:16:50 hillion Exp $ + * @version $Id: WindowWrapper.java,v 1.3 2002/03/07 15:23:11 hillion Exp $ */ public class WindowWrapper extends ScriptableObject { + + private final static Object[] EMPTY_ARGUMENTS = new Object[0]; /** * The rhino interpreter. @@ -82,17 +84,11 @@ long to = ((Long)NativeJavaObject.coerceType (Long.TYPE, args[1])).longValue(); if (args[0] instanceof Function) { - /* - Object[] fargs = new Object[len - 2]; - for (int i = 2, j = 0; i < len; i++, j++) { - fargs[j] = args[i]; - } - */ RhinoInterpreter interp = (RhinoInterpreter)window.getInterpreter(); FunctionWrapper fw; fw = new FunctionWrapper(interp, (Function)args[0], - new Object[0]); + EMPTY_ARGUMENTS); return window.setInterval(fw, to); } String script = @@ -117,17 +113,11 @@ long to = ((Long)NativeJavaObject.coerceType (Long.TYPE, args[1])).longValue(); if (args[0] instanceof Function) { - /* - Object[] fargs = new Object[len - 2]; - for (int i = 2, j = 0; i < len; i++, j++) { - fargs[j] = args[i]; - } - */ RhinoInterpreter interp = (RhinoInterpreter)window.getInterpreter(); FunctionWrapper fw; fw = new FunctionWrapper(interp, (Function)args[0], - new Object[0]); + EMPTY_ARGUMENTS); return window.setTimeout(fw, to); } String script = 1.2 +2 -2 xml-batik/xdocs/scriptFeatures.xml Index: scriptFeatures.xml =================================================================== RCS file: /home/cvs/xml-batik/xdocs/scriptFeatures.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- scriptFeatures.xml 7 Mar 2002 15:16:50 -0000 1.1 +++ scriptFeatures.xml 7 Mar 2002 15:23:12 -0000 1.2 @@ -11,7 +11,7 @@ <!-- ========================================================================= --> <!-- author [EMAIL PROTECTED] --> -<!-- version $Id: scriptFeatures.xml,v 1.1 2002/03/07 15:16:50 hillion Exp $ --> +<!-- version $Id: scriptFeatures.xml,v 1.2 2002/03/07 15:23:12 hillion Exp $ --> <!-- ========================================================================= --> <document> <header> @@ -39,7 +39,7 @@ </p> <note>In the ECMAScript programs executed in an SVG document, the <code>window</code> object is the global object, so - its properties and methods can be accessed without qualifing + its properties and methods can be accessed without qualifying them.</note> <p> It provides the following features:
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]