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 00:47:07 UTC

Ecmascript breaks JSVGCanvas example..?

Hi,

I'm trying to use the example code listing for the JSVGCanvas. I've got
it running OK, but whenever I try to open an SVG with a <script
type="text/ecmascript">...</script> section, it hangs in the Build
phase. (Remove this tag and everything works.)

I've even tried with empty contents (or perhaps one comment) within the
script section, but no luck.

I'm sure it's a small issue involving the Rhino configuration or
classpath or some such, but I can't figure it out.

Suggestions? Much appreciated!

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


Extending RhinoScript as per the example

Posted by Alec Smecher <al...@praxistech.com>.
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: Ecmascript breaks JSVGCanvas example..?

Posted by Alec Smecher <al...@praxistech.com>.
Oop. Tried again and everything's working fine. Any problems remaining are
now my own :)

Thanks,
Alec Smecher
alecs@praxistech.com

Christophe Jolif wrote:

> Alec,
>
> As it works fine for me, could you be more precise to help me find the
> origin of your problem:
>
> - what is exactly the batik release you are using, 1.0, the current one
> from the repository?
> - does what is in your script tag matters?
>
> Thanks.
>
> Alec Smecher wrote:
> >
> > Hi,
> >
> > I'm trying to use the example code listing for the JSVGCanvas. I've got
> > it running OK, but whenever I try to open an SVG with a <script
> > type="text/ecmascript">...</script> section, it hangs in the Build
> > phase. (Remove this tag and everything works.)
> >
> > I've even tried with empty contents (or perhaps one comment) within the
> > script section, but no luck.
> >
> > I'm sure it's a small issue involving the Rhino configuration or
> > classpath or some such, but I can't figure it out.
> >
> > Suggestions? Much appreciated!
> >
> > 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
>
> --
> Christophe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org


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


Re: Ecmascript breaks JSVGCanvas example..?

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

As it works fine for me, could you be more precise to help me find the
origin of your problem:

- what is exactly the batik release you are using, 1.0, the current one
from the repository?
- does what is in your script tag matters?

Thanks.

Alec Smecher wrote:
> 
> Hi,
> 
> I'm trying to use the example code listing for the JSVGCanvas. I've got
> it running OK, but whenever I try to open an SVG with a <script
> type="text/ecmascript">...</script> section, it hangs in the Build
> phase. (Remove this tag and everything works.)
> 
> I've even tried with empty contents (or perhaps one comment) within the
> script section, but no luck.
> 
> I'm sure it's a small issue involving the Rhino configuration or
> classpath or some such, but I can't figure it out.
> 
> Suggestions? Much appreciated!
> 
> 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

-- 
Christophe

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