Apples to Oranges in FileStream

Kevin Fisher kfisher at rim.net
Fri Aug 21 12:41:41 UTC 1998


Lex Spoon <lex at cc.gatech.edu> wrote:
> Michael Donegan writes:
>  > Squeak is great, but it has a few pitfalls when you actually try to get
>  > something done. PositionableStream>>nextNumber: and nextInt32 have similar
>  > problems with
>  > missing asInteger after a self next.
> 
> I think this is a bit harsh.
> 
> In the case you mention, these methods are intended for streams of
> bytes, not streams of characters.  If you send "binary" to the stream
> before calling them, or otherwise use a stream of bytes, then they
> work fine.
> 
> For the original poster's case, the failing methods shouldn't fail,
> but then again they aren't really needed, either.  If you look at
> FileStream's methods, you can actually open the file in whatever mode
> you want anyway, and thus not have to change the mode afterwards.
>

Yes, I followed through the concreteStream implimentation and found that. :)
In reality I probably wouldn't have done that, but I was just trying out
a bunch of different FileStream methods just to see what they'd do.
 
> 
> In general, Squeak does have rough spots.  But at least in Squeak you
> can *change* the things you don't like.  This isn't true for all that
> many development environments.  And furthermore, really bad problems
> don't tend to last for long, because someone among the community will
> fix it and publish their fix.
> 
> Lex

That's what I like about this whole system...not only can I work my way 
through all the classes to see how they're done, but I can change them.  Being 
a bit on the obsessive side I still might see if I can 'fix' the method so it 
doesn't fail, if I get a chance.





More information about the Squeak-dev mailing list