xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Armhold <armh...@cs.rutgers.edu>
Subject Re: JSVGComponent dynamic DOM update, invokeAndWait threading issue
Date Fri, 10 Oct 2003 08:12:56 GMT
Thomas DeWeese wrote:

 > Hmm, there is a problem with this.  The BridgeContext isn't disposed
 > of until after all the managerStopped Listeners have been called.  I
 > don't think this is correct behavior, but until it's fixed you will
 > actually have to hang your listener off the document load or gvt
 > build listener to make sure the old document is no longer 'active'.
 >> You mean I should install this listener after (say) gvtBuildCompleted?

 > No I meant you will need to use the gvtBuildCompleted event to know
 > that your oldDoc is 100% disentangled from the Canvas.  You should
 > probably also catch the build failed (problem with doc), and build
 > canceled events as well.

Sorry, but I don't quite understand how waiting for gvtBuildCompleted
fixes the problem with the BridgeContext.  Won't
gvtBuildCompleted/Canceled/Failed get called way before the
UpdateManagerListeners?  I can see how it makes sense to catch these
events in case the UpdateManager never gets started (I'm assuming it
won't be started if the gvtBuild gets canceled/failed.)  And from
previous discussion I think I also need to wait until
gvtRenderingCompleted before even getting access to the UpdateManager.
So my understanding (probably incorrect) is that I need to do the
following to know when the canvas is "done" with the document:

If I see any of:


then there was a problem, and the UpdateManager never got started.
Else, when I wait for gvtRenderingCompleted, at which point I can
safely call getUpdateManager, and then wait for managerStopped.  THEN
it's safe to access the document.  Whew. :-) I am basing this on the
"Rendering Process" section of the JSVGComponent javadoc.  Where am I
going wrong?


To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message