You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Alec Smecher <al...@praxistech.com> on 2001/06/05 20:37:54 UTC

Extending RhinoScript as per the example

Hi,

Having figured out my previous problem (it was actually Rhino's dynamic
class loading botching due to Java Web Start's custom classloader), I've
moved on to another deadlock.

I'm tinkering with the example given of extending Rhino's functionality to
include a new function. There's a few typos in the code, though - looking at
http://xml.apache.org/batik/scripting.html - and if someone could point me
in the right direction I'd be deeply pleased :)

First, there's a mention towards the end of the code of "new
org.apache.batik.scriptInterpreterPool" - This should read "new
org.apache.batik.script.InterpreterPool".

Second, the line shortly following that reading
"ctx.setInterpreterPool(pool);" will not compile since that method is
protected.

How would I best go about setting the interpreter pool without using this
method?

Thanks,
Alec Smecher
alecs@praxistech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Extending RhinoScript as per the example

Posted by Christophe Jolif <cj...@ilog.fr>.
Alec,

Alec Smecher wrote:

> First, there's a mention towards the end of the code of "new
> org.apache.batik.scriptInterpreterPool" - This should read "new
> org.apache.batik.script.InterpreterPool".

Thanks for reporting this typo, I just have corrected it in the
repository, it will be changed on the web site as soon as it will be
regenerated.

> Second, the line shortly following that reading
> "ctx.setInterpreterPool(pool);" will not compile since that method is
> protected.
> 
> How would I best go about setting the interpreter pool without using this
> method?

Ok during the beta process it looks like someone moved that method from
public to protected and I didn't catch that point in the script
introduction document. So you're right it doesn't work.

I don't know in which exact context you are, but there is a
BridgeContext constructor having an InterpreterPool in parameter, does
it solve your problem? 

Sorry for these documentation problems,
-- 
Christophe

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org