George Armhold wrote:
Thomas,

Thanks again for yet another speedy response.

This would indicate to me that the MouseReleased code is running
after the load event (the getUpdateManager call is before the call
to invokeAndWait so it's hard to blame a null return from getUM on
invokeAndWait :).


Yes, it sure looks that way.  But assuming that Swing fires event
sequentially, it should mirror what the user is doing- MousePressed,
MouseDragged, MouseReleased, click on "load new SVG" button.

This is why I would put print statements in the event handlers. I suspect something 'surprising' happening in the event handing...

Just picking on words here you say "after MouseReleased event" is
this happening _in_ the mouseRelease callback, or is it code
triggered by the mouse release callback?

Oops. I should have said that the code is called INSIDE the MouseReleased callback. So the call to "invokeAndWait" is running in the Swing/AWT thread.

Any possability that the mouse release is the release from the user pressing the 'load' button?

So I guess my question is the following: how can I dynamically and
synchronously update the DOM via Swing/AWT events? I need to block
until the update completes.

The above should do it (although I really suspect that you don't need to block in this case if you are just throwing away the document anyway).

Well the problem is that I'm not throwing the document away. It's
true that if the user loads a new doc before the screen is done
updating from the new DOM elements, this presents no crisis. However
I *do* care that the doc is properly updated, because I then retrieve
the doc from the JSVGComponent and save it to disk, with the newly
added <line> elements.

Ok A word of caution on my previous assurences about 'good behaviour' The canvas will make sure that the any currently running update completes but I do not think it will run the Update Manager queue to empty.

This is why I was trying to make the Swing
thread block until the DOM was updated- to prevent the user from being
able to click the "load new document" button until all elements were
added.

My suspicion is that you have succeeded in this and that you are picking up another mouse up somewhere along the line.



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



Reply via email to