Hi Jorg,
I have no idea why you are getting this error. I have
never seen it. My initial suspicion is that you are removing
the same element from two different threads. I would be
curious to know what getPreviousSibling() and getNextSibling()
return right before calling removeChild.
I would also be interested in knowing how you add the
elements to the DOM.
Is this error totally reproducable? can you produce a
reproducable standalone test case?
Jorg Heymans wrote:
Hi,
I am able to add stuff to the DOM in the update thread
(getUpdateManager().getUpdateRunnableQueue().invokeLater() )
Why is a simple removal then not working like i expect it to work?
I locate the node to remove using document.getElementById , making sure
with getLocalName() and getAttributes() that this is actually the node i
want to remove.
Then in the update thread i am doing
removenode.getParent().removeChild(removenode) which results in
stacktrace ("g" being the element i want to remove)
org.w3c.dom.DOMException: The child node (type: 1, name: g) is missing.
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at org.apache.batik.dom.AbstractParentNode$ChildNodes.remove(Unknown
Source)
at org.apache.batik.dom.AbstractParentNode.removeChild(Unknown Source)
at com.terrasel.osgis.batikapplet.SVGApplet$2.run(SVGApplet.java:187)
at org.apache.batik.util.RunnableQueue.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
The element i want to remove is the one i just dynamically added. I
think i am operating on a recent document instance because i can
actually *find* the element.
Removing static elements always works, so where am I missing the sync on
the document instance?
Any hints?
Regards
Jorg
---------------------------------------------------------------------
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]