Karel Hübl created PIVOT-929:
--------------------------------
Summary: The Clipboard content is cleared by qued callback
Key: PIVOT-929
URL: https://issues.apache.org/jira/browse/PIVOT-929
Project: Pivot
Issue Type: Bug
Affects Versions: 2.0.3
Reporter: Karel Hübl
The Clipboard content is cleared by qued callback.
We used LocalManifest value map to store references to POJO representing
TreeView items participating in Cut and Paste.
When we put LocalManifest to Clipboard using Clipboard.setContent, then we
expected to get it back later using Clipboard.getContent().
However this works only for the first time. Next, when we create new
LocalManifest instance and put it to Clipboard we never get it back.
The reason for this is implementation of
org.apache.pivot.wtk.Clipboard.setContent method. The inner ClipboardOwner
class clears the LocalManifest stored in Clipboard.content static variable. The
problém is, that the call to lostOwnerhip notification method is not called
directly from AWT Clipboard.setContents method, but queued to AWT Event queue.
So the ClipboardOwner from previous call to
org.apache.pivot.wtk.Clipboard.setContent method, clears the new
Clipboard.content field immediately since it is executed later from AWT event
queue.
This is not problem for text, image and files, because of propagation to AWT
clipboard.
Patch will be uploaded...
--
This message was sent by Atlassian JIRA
(v6.1#6144)