xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject Re: svgDocument.getElementById returns null (now BridgeContext.getGraphicsNode returns null)
Date Wed, 21 Mar 2001 12:33:15 GMT
>>>>> "DB" == Denis Bohm <denis@fireflydesign.com> writes:

DB> I figured out what's happening.  There is another thread that is
DB> kicked off after the document load that builds the svg, and it
DB> hasn't finished yet when I try to do the lookup.  It looks like
DB> the best thing for me to do is to write my own component (similar
DB> to JSVGComponent) where I can control the flow.

    You can also extend JSVGComponent's,
documentLoadingComplete/Cancelled/Failed methods, which will tell you
when the document is done being loaded (or aborted for some reason).

    Actually I think you want to wait until the gvtBuild is complete,
which means that you want to extend the
gvtBuildCompleted/Cancelled/Failed methods.

    This way you don't tie up the event thread for the relatively long
processes of loading the document.

    Then all you need to do is move the getElementById stuff to the
proper xxxCompleted method.

    I would recommend against writing your own component.

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


Mime
View raw message