On 1 Nov 2004, at 16:01, Thomas DeWeese wrote:
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.
Jeffrey Hau wrote:
I am trying to implement a listener interface, again i was trying out the example given in rhino's tutorial pages. what i really want to do is to have a call back functionality (waiting for a server to respond, then update my svg document), is the only way to achieve this by doing the following in my java code?
So if it's a DOM callback (addEventListener) or a JavaScript callback (setTimeout, getURL, ...), in other words a callback
initiated by Batik, then you will be called you in the update thread.
It sounds like you might be able to just use 'getURL' which is a
semi-standard SVG way to get data from a server (it will be standard
in SVG 1.2).
If you are spinning threads and doing your own network stuff, then you either need to do:
JSVGCanvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(.....
Or you could cheat a bit and set a global that you check in a 'setTimeout' callback (busy waiting).
thanks very much for you help,
No problem.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]