Hi all !
Is this the correct way ti send an event to an element of a svg document loader in a SVGCanvas ?
It looks mostly correct.
Normally it works. But when application (an applet) uses network sometimes execution flow hangs on method “ t.dispatchEvent(ev); “
The execution stops for a minnumum of 1 sec to a max of 10 sec on slow PC. Normally execution, also on slow PC, doesn’t stop on it.
But the very strange think is that detaching Ethernet cable it always run well.
Sounds like some network communication is timing out.
The method t.dispatchEvent(ev); causes a click event on an element with the attribute OnClick that call a Jscript function that do some Jscript work and finally call the method “Commit” of an extended Jscript interpreter :
[...]
Then call “Finish” that cause SVG to be unloaded and substituted with another svg document.
Dispathing event to the element permits Java -> SVG Jscript communication
Extending RhinoInterpreter allows SVG JScript -> Java communication.
Well I would probably just use interpreter.eval to do Java to JavaScript communication.
And I would probably just bind a Java object to enable JScript to Java communication (if fact this is what I would do as I have done it :).
Is this a good way to obtain desired behaviour ?
It sounds like it should work although I think the eval and bind are a little cleaner.
And if yes why that strange “thinking” when dispatching event to DOM only when application uses network ? (RMI and sockets)
Sounds like a problem in your RMI code?
The last thing to notice is that this happens only with recent nightly batik release (probably 03-11-27 ) but work always well with old downloadable batik jars.
I guess I don't follow you think the bug was introduced on 11/27? There wasn't a commit on 11/27 there was on 11/25 but I doubt that had anything to do with this. Can you check what the treads are doing while it is 'thinking'? On Windows you can trigger a thread dump with 'ctrl-break' on Unix I think a kill -3 does the same thing.
I need to use new batik jar because of their good performance on very heavy (1000 png and lots Jscript) svg document.
I'm glad to hear this. Let's see what we can find.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]