Jeffrey Hau wrote:

i have the following ecmascript embedded in a svg document,

function test() { alert("test java.") };
obj = { run: test };
r = java.lang.Runnable(obj);
t = new java.lang.Thread(r);
t.start();

when i run this in batik (JSVGCanvas) i get the following error,

org.mozilla.javascript.EvaluatorException: error instantiating (java.lang.RuntimeException: NOT SUPPORTED): class java.lang.Runnable is interface or abstract (Inline <script> file:/Users/jh398//lines.svg:6; line 18)
at


however the above script works fine in rhino's shell. Has this feature been disabled in batik?

Not to my knowledge. However I can't figure out where the error message is coming from (neither Batik nor Rhino has the string "NOT SUPPORTED" in them). If you are running in Squiggle with security turned on this message might come from the JVM it's self.

   Also, I wouldn't do what you are doing... Our JavaScript
interface is not thread safe, and even if it were our DOM
interface isn't and if you modify the document from the thread
you create you are likely to run into _serious_ issues.

   Further there is no way to fix this issue with the current
JavaScript interface.  You need access to the equivalent of the
'event queue' (from swing) for the SVG implementation.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to