Ziru Zhu wrote:
I am currently using Batik to develop in our visualization part of project.
I hope you are finding it useful.
Our SVG doc contains some scripts providing some interactive functionalities such as rotation, zooming and so on. Also the doc should be dynamically updatable so that new data from the server side can be used to update the DOC contents.
Unfortunately, a NullPointer exception is thrown out when we activating the scripts by clicking the displaying portion while the update manager is substituing stale data. The problem is how to disable the scripting feature when UpdateMgr thread is changing the DOC.
It isn't 100% clear if by 'scripting' you mean ecma script or not. I would assume so, but since all ecma script is run in the UpdateMgr thread I don't see how your changes and the script could be running at the same time. Put another way the scripting features is 'disabled' when the UpdateMgr is working - to be more accurate scripting is 'delayed' - to be even more accurate the delivery of events that trigger scripting are delayed. The place I could see you getting into trouble would be if you have 'setTimeout' or getURL stuff going on in which case it is your responsability to ensure you notice when stuff leaves the DOM tree - you can always 'stop' the update manger thread if you are truely done but that will kill the document entirely.
You may need to provide more information about the exact circumstance of the NPE (perhaps provide the stack trace - with line numbers?), or a reproducable test case before I can help you any more.
Second, I find that the SVG display will not work if I change (or add / remove) the svgRoot's attributes in the UpdateMgr. Is there any work around for this?
Once again can you be more specific? Standalone test case?
Thanks.
-Ziru Zhu ([EMAIL PROTECTED])
--------------------------------------------------------------------- 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]