Hi Jeff.
Jeff Cressman:
> I'm trying to follow the example at
> http://xmlgraphics.apache.org/batik/using/scripting/ecmascript.html#customizingRhino
> to extend the RhinoInterpreter and include a print function but it's not
> working out for me. Just a note: RhinoInterpreter is spelled incorrectly in
> the class declaration line.
Thanks.
> I'm using Batik 1.7, Java 1.3.1, netbeans, a macbook, and this code:
> …
> public class ExtendedRhinoInterpreter extends RhinoInterpreter {
>
> public ExtendedRhinoInterpreter(URL documentURL) {
> …
> I'm getting an error with the constructor. The example is missing the URL
> argument but even when I add it I get this error:
>
> ExtendedRhinoInterpreter.java:24: RhinoInterpreter(java.net.URL) in
> org.apache.batik.script.rhino.RhinoInterpreter cannot be applied to ()
That’s a mistake in the example. The RhinoInterpreter class has no
default constructor, just one that takes a single URL object.
> A second error I'm getting is with this line:
>
> getGlobalObject().defineFunctionProperties
> (names, ExtendedRhinoIntepreter.class,
> ScriptableObject.DONTENUM);
That’s the mis-spelling of “ExtendedRhinoInterpreter” causing a problem,
I think.
I’ve updated that page in a number of places so that the example should
work; it should be visible within an hour on the website. (And
apologies for having a less-than-stable API there.)
--
Cameron McCormack, http://mcc.id.au/
xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]