[squeak-dev] Why ReadWriteStream>>#contents?
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue May 1 20:21:30 UTC 2018
IMO ReadWriteStream is an awfull mess and should better not be used at all.
2018-05-01 22:00 GMT+02:00 Chris Muller <ma.chris.m at gmail.com>:
> Does anyone know why ReadWriteStream overrides #contents from WriteStream?
>
> WriteStream behaves as I would expect
>
> |stream| stream := WriteStream on: String new.
> stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents "--->
> 'C' as expected"
>
> but ReadWriteStream doesn't...
>
> |stream| stream := ReadWriteStream on: String new.
> stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents "--->
> 'Chris' unexpected!"
>
> I want to reuse a ReadWriteStream, so I want #contents to honor the end
> position. What's going on here?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180501/7d4c2b96/attachment.html>
More information about the Squeak-dev
mailing list
|