The Trunk: ST80-nice.173.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ST80-nice.173.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.173.mcz

David T. Lewis
On Mon, Jul 21, 2014 at 10:42:21PM +0000, [hidden email] wrote:
>
> I should stop repeating myself, but there is so many duplicated code.
> I should stop repeating myself, but there is so many duplicated code.
>

ha!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: ST80-nice.173.mcz

timrowledge


/tim
{insert witticism here}

> On Jul 21, 2014, at 17:18, "David T. Lewis" <[hidden email]> wrote:
>
>> On Mon, Jul 21, 2014 at 10:42:21PM +0000, [hidden email] wrote:
>>
>> I should stop repeating myself, but there is so many duplicated code.
>> I should stop repeating myself, but there is so many duplicated code.

And aside from that there is a lot of duplicated code redundantly duplicated.

tim, dept. of redundancy dept.