xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kane <dk...@money.buser.net>
Subject Re: Multiplication of Event Handlers (May be related to JSVGCanvas -java.lang.OutOfMemoryError)
Date Wed, 05 Sep 2001 19:48:21 GMT
Folks,

> In the SVG Browser case, when you reload an SVG file, a new Document
> instance is created, in your case, you reuse it that's why the behavior
> is correct in the SVG Browser and not in your example. This comes from
> the fact that as Batik is still a merely static SVG implementation we
> haven't implemented everything needed for a correct behavior in dynamic
> context.

We are trying to determine if we can work around the current limitations
to see if we can move forward until more dynamic capabilities are
supported....speaking of which, is there a time-frame in mind for
supporting the dynamic elements of the SVG spec?

> In that case, the listeners that are put on the DOM by the
> Batik bridge to call the SVG scripts are not removed when the document
> is unloaded. Thus when reloading it, the listeners are registered twice
> and the scripts called twice.

I suspected it was something like that, but I'm still not too familiar
with the batik's core source code.

> I commited a new version of
> sources/org/apache/batik/bridge/BridgeEventSupport.java that should fix
> your problem by removing the listeners when unloading a document.
> Can you please update you Batik version with that file and let me know
> if it solves your problem?

Yes it does fix the problem.  It not only fixes the problem for the
Example I posted, but it also fixes the problem in my original code, from
which I derived the example.

Thanks for your quick response.

Dave


---------------------------------------------------------------------
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