[BUG]Stream class>on:from:to: & reset

Tim Rowledge rowledge at interval.com
Thu Sep 2 17:47:36 UTC 1999


If one makes a ReadStream or WriteStream using #on:from:to:, you get to
stream on the contents of the collection starting at the from'th element
and ending at the to'th element.

Unfortunately if you the reset the stream, it will start at the first
element, no matter what the from index was supposed to be!

The bad news is that fixing this _could_ be a bit tricky, since we would
need to add an instvar to each class, and this would mess up any prims
relying on instvar numbering; I can't see any right now, but that doesn't
mean there aren't any! If we're safe to add and instvar, the fix is pretty
trivial. 

I've looked back as far as a 1982 sources file, and it was like that all
the way back. Guess nobody resets partial streams very often :-)

tim

-- 
I am still waiting for the advent of the computer science groupie.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list