You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Sandro Martini (JIRA)" <ji...@apache.org> on 2014/04/29 09:50:15 UTC

[jira] [Updated] (PIVOT-929) The Clipboard content is cleared by queued callback

     [ https://issues.apache.org/jira/browse/PIVOT-929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandro Martini updated PIVOT-929:
---------------------------------

    Summary: The Clipboard content is cleared by queued callback  (was: The Clipboard content is cleared by qued callback)

> The Clipboard content is cleared by queued 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
>            Assignee: Sandro Martini
>             Fix For: 2.0.4, 2.1
>
>         Attachments: Pivot-929-2.0.x_rev1539956.patch
>
>
> 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.2#6252)