[Pkg] The Trunk: System-fbs.548.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 15 15:21:33 UTC 2013

Frank Shearar uploaded a new version of System to project The Trunk:

==================== Summary ====================

Name: System-fbs.548
Author: fbs
Time: 15 June 2013, 4:21:18.358 pm
UUID: 162f5729-5ef9-48f5-8bb9-1a77deba7ecd
Ancestors: System-fbs.547

It's "its", not "it's". "It's" is a contraction of "it is".

=============== Diff against System-fbs.547 ===============

Item was changed:
  Object subclass: #Clipboard
  	instanceVariableNames: 'contents recent interpreter'
  	classVariableNames: 'Default'
  	poolDictionaries: ''
  	category: 'System-Support'!
+ !Clipboard commentStamp: 'fbs 6/15/2013 16:20' prior: 0!
- !Clipboard commentStamp: 'ul 8/20/2012 02:14' prior: 0!
  The Clipboard class implements a basic buffering scheme for text. The currently selected text is also exported to the OS so that text can be copied from and to other applications. Commonly only a single instance is used (the default clipboard) but applications are free to use other than the default clipboard if necessary.
+ If you'd like to be notified of the changes of the clipboard, you can subscribe to its #contentChanged event. For example:
- If you'd like to be notified of the changes of the clipboard, you can subscribe to it's #contentChanged event. For example:
  subscriber := [ :newClipboardText :updateSource | 
  	Transcript show: ('Clipboard was updated by {1}, the new content is: {2}'
  		format: {
  			newClipboardText }); cr ].
  Clipboard default
  	when: #contentChanged
  	send: #value:value:
  	to: subscriber.
  At this point if you open a Transcript and copy or cut some text, then the message will appear on the Transcript. Make sure that there's a reference kept to subscriber, otherwise it will be garbage collected and no messages will appear.
  To unsubscribe from the clipboard changes, just evaluate:
  Clipboard default removeActionsWithReceiver: subscriber!

More information about the Packages mailing list