Hi Thomas,
thank you again for getting back to me...
Well, basically my application is doing two tooltip changes.
1) there are like 100 circles which all have a tooltip and get changed
pretty often (about every 2 seconds) ... but this didn't throw any exceptions
2) then there are a few polygons with tooltips, which are displaying
the actually contained circle elements.. so when I do a mouse over on the
polygon the tooltip pops up, and sometimes it throws this exception, but only
sometimes...
My tooltip changes are all done in the Updatemanager thread...
What do you recommend me? Changing the handleElement method myself?
Thanks again for your great help, you are our hero... :-)
Dominik Steiner
-----Ursprüngliche Nachricht-----
Von: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 9. September 2005 12:24
An: [email protected]
Betreff: Re: NullPointerException with setToolTip in CanvasUserAgent
Hi Steiner,
Steiner, Dominik wrote:
> The line in the JSVGCanvas which throws the exception is following
>
> SVGDocument doc = (SVGDocument)elt.getOwnerDocument();
Actually this means that 'elt' is null. In this context 'elt'
is the parent of a 'title' or 'desc' element. So are you dynamically
modifying the title/desc on mouseover or something? It's easy enough to
check if the 'parent' is null in 'handleElement', but I'm trying to
figure out how it get's here in the first place.
I should note that in this context I think this code is a bit
fishy, we are poking around the DOM tree outside of the UpdateManager
thread which really isn't a good thing. Probably the call to
handleElement shouldn't be forwarded to the AWT Event thread. Most of
the work should be done in the UpdateManager thread and only the
final tool-tip manipulation should be done in the AWT thread...
> So that means that my element has no ownerdocument... as it is launched
> from the EventDispatchThread I'm not sure how to avoid this exception by
> checking that my element is not null??
---------------------------------------------------------------------
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]