xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randy.kun...@us.abb.com
Subject Re: Passing object from JSVGCanvas to RhinoInterpreter
Date Mon, 16 Apr 2007 15:49:37 GMT
Hi Emmy,

JavaScript has two ways to interface to Java. One is "Package" and the 
other is "java" (which is short for "Package.java") and refers to a class. 
Create a static "instance()" method of MyJSVGCanvas (i.e. 
Package.MyJSVGCanvas from JavaScript) that returns your object and assign 
it to a JavaScript variable. Then you can call the methods of the object 
via that variable. If your class is part of a package, then it would be 
"Package.x.y.z.MyJSVGCanvas.instance()". This is from memory, so forgive 
me if it's not exactly the right syntax, but the concept is sound.

Regards,
Randy



Message from "Emmy Alex" <ealex@hermes.tietronix.com> received on 
04/15/2007 11:52 AM

04/15/2007 11:52 AM



"Emmy Alex" <ealex@hermes.tietronix.com>

Please respond to batik-users@xmlgraphics.apache.org
Sent by "Emmy Alex" <ealex@hermes.tietronix.com>



        To:     <batik-users@xmlgraphics.apache.org>
        cc: 
        Subject:        Passing object from JSVGCanvas to RhinoInterpreter

Hello All,
I have my own class MyJSVGCanvas which extends JSVGCanvas and I have a 
member object for some logging purposes, in MyJSVGCanvas class. Is there 
anyway that I can access this object in the 
org.apache.batik.script.rhino.RhinoInterpreter class , I need it to store 
some values i find in the script into that member object of MyJSVGCanvas 
class.

Any help will be appreciated.
Thanks,
Emmy 
 

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




Mime
View raw message