Denis Bohm wrote:

I have an application that I would like to implement using SVG and the Java
Language Binding Scripting.  I have an SVG document and a Java
EventListenerInitializer that is working in Squiggle.  So far, so good.  Now
I would like to sping off a thread that creates a socket connection and
listens for data.  When the data arrives I would like to update the SVG DOM.
To do that I need to ask the Batik canvas for the update manager and ask
that for the runnable queue then queue up a runnable to do the update.
However, I don't have a reference to the canvas.  Is there some way to get
one from the document?

Well the Window object we provide has a method 'getBridgeContext' and the BridgeContext can provide you with the UpdateManager (if there is one).

I would also like my code to not use any Batik implementation specific stuff
(in the hope that other browsers will also support SVG with Java scripting).

The above is 100% pure Batik :)


So I took a look at the SVG 1.2 spec to see if there was some upcoming
standard way to do this.  Section 11 talks about adding a SVGWindow
interface with a way to create SVGTimer objects that can run a set of
SVGRunnable objects.  So it sounds like the following:

[...]


but it could potentially run in other implementations.  Does that sound
right?

This might be a route to go. I suspect they WG is trying to standardize on how to access the DOM in a multi-threaded environment, so it may provide a less 'hacky' way to do this in the future.

BTW: It looks like adding these interfaces and an implementation that just
routes the calls the existing Batik code would be fairly straight forward.
Is there any interest in that?

Contributions are always welcome!



Thanks, Denis


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






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



Reply via email to