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" <[EMAIL PROTECTED]> received on 04/15/2007 11:52 AM 04/15/2007 11:52 AM "Emmy Alex" <[EMAIL PROTECTED]> Please respond to [email protected] Sent by "Emmy Alex" <[EMAIL PROTECTED]> To: <[email protected]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
