[squeak-dev] Re: [Ann] Cuis 3.2 is released

Juan Vuletich juan at jvuletich.org
Wed Apr 27 17:50:49 UTC 2011


Hi Folks,

Michael did some testing to help me find and fix the problem. The fix is 
attached.

Thanks Michael!

Cheers,
Juan Vuletich

Michael J. Forster wrote:
> Hi Juan,
>
> I just noticed that pasting text, whether cut or copied, and whether via the
> cmd-v or the text editor pop-up menu, does not work in 3.2 on my Ubuntu box. 
> However, it still works on my Mac.  (Platform specs below.)
>
> I see that Editor>>paste and the implementation of Clipboard have changed
> recently.  I haven't had a chance to debug it further, but I thought I would
> let you know.
>
> Cheers,
>
> Mike
>
>
> Cuis3.0-0763
> Cuis3.2-0914
>
> Ubuntu 10.10
> Squeak-4.0.3.2202-linux_i386
> Squeak-4.4.7.2357-linux_i386
>
> OS X 10.5.8
> Squeak 64-32 5.4b2
>
>
> --
> View this message in context: http://forum.world.st/Ann-Cuis-3-2-is-released-tp3445583p3474506.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1321 / Virus Database: 1500/3597 - Release Date: 04/25/11
>
>
>   

-------------- next part --------------
'From Cuis 3.2 of 12 April 2011 [latest update: #914] on 27 April 2011 at 10:07:07 am'!

!Clipboard methodsFor: 'accessing' stamp: 'jmv 4/27/2011 10:06'!
retrieveObject
	"Answer whatever was last stored in the clipboard"
	| stringOrNil |

	"If the OS clipboard has the id for our contents, or the same characters, then answer the richer Smalltalk object.
	Note: if the (extended) clipboard contains a serialized object, it shouldn't contain an id, so
	it is deserialized even if ivar contents contains the object. This is done to guarantee consistency with pasting
	from another Cuis image."
	stringOrNil _ self retrieveIdOrStringFromOS.
	(stringOrNil = (self idFor: contents) or: [ stringOrNil = contents asString])
		ifTrue: [
			"We copy the object, because the result of each paste operation could be modified independently of the others afterwards
			(and the same clipboard contents might be pasted many times)"
			^contents copyForClipboard ].

	"If we have the ExtendedClipboardInterface, try to get an RTF or Form"
	Smalltalk at: #ExtendedClipboardInterface ifPresent: [ :clipboardInterface |
		clipboardInterface current retrieveObject ifNotNil: [ :object | ^object ]].

	"Otherwise answer the string brought by clipboard primitives,
	but if they are not present or fail, use the internal clipboard."
	^stringOrNil ifNil: [ contents copyForClipboard ]! !



More information about the Squeak-dev mailing list