Clipboard copy problems

31 views
Skip to first unread message

Gabriel Cotelli

unread,
Dec 27, 2011, 9:44:42 AM12/27/11
to va-sma...@googlegroups.com
Hi, 
I've found the following problem in EsString>>copyToClipboard  :
This method sends several messages to a CgDisplay instance to perform the copyToClipboard but ignores the return values. This is the EsString code:

copyToClipboard
	| display window itemId |
	display := CgDisplay default.
	window := CgWindow default.
	itemId := ReturnParameter new.
	display clipboardStartCopy: window clipLabel: 'Text Copy' itemIdReturn: itemId.
	display clipboardCopy: window itemId: itemId value formatName: 'STRING' buffer: self privateId: 0.
	display clipboardEndCopy: window itemId: itemId value

the three last message sends returns a kind of constant indicating if the operation was succesful, failed or the clipboard is locked. If the clipboardStartCopy* returns "ClipboardLocked" the next message send raises a DNU.

I think the right behavior must be: 
  • For ClipboardLocked cases raise a kind of Warning/Error (so this can be handled and the warning can be retried or returned)
  • For ClipboardFailed cases raise a kind of Error
Probably other senders of this messages have the same problems.

All of this happens in VA 8.5.0 (but I think also affects other VA versions)

Regards,
Gabriel
Reply all
Reply to author
Forward
0 new messages