[squeak-dev] The Trunk: ST80-nice.173.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jul 21 22:42:38 UTC 2014


Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.173.mcz

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

Name: ST80-nice.173
Author: nice
Time: 22 July 2014, 12:42:05.913 am
UUID: 6e29682c-c008-492b-96ae-365e1996d952
Ancestors: ST80-cmm.172

Remove another bit of Read/Write madness.
There is NO reason why a text selection stream should be Read/Write.
As the comment says, the intention is to answer a ReadStream and each and every usage will be that of a ReadStream.
If ever some edition has to happen on the selection, it won't be thru the selectionAsStream, no never. It will be thru another channel, the editor itself (see compile:notifying:)

I should stop repeating myself, but there is so many duplicated code.
I should stop repeating myself, but there is so many duplicated code.

=============== Diff against ST80-cmm.172 ===============

Item was changed:
  ----- Method: ParagraphEditor>>fileItIn (in category 'menu messages') -----
  fileItIn
  	"Make a Stream on the text selection and fileIn it.
  	 1/24/96 sw: moved here from FileController; this function can be useful from any text window that shows stuff in chunk format"
  
  	| selection |
  	selection := self selection.
  	self terminateAndInitializeAround:
+ 		[(ReadStream on: selection string from: 1 to: selection size) fileIn].
- 		[(ReadWriteStream on: selection string from: 1 to: selection size) fileIn].
  !

Item was changed:
  ----- Method: ParagraphEditor>>selectionAsStream (in category 'accessing-selection') -----
  selectionAsStream
  	"Answer a ReadStream on the text in the paragraph that is currently 
  	selected."
  
+ 	^ReadStream
- 	^ReadWriteStream
  		on: paragraph string
  		from: self startIndex
  		to: self stopIndex - 1!



More information about the Squeak-dev mailing list