Squeak 2.1 for UNIX?
Joe Davison
jwdavison at lucent.com
Tue Aug 18 18:53:21 UTC 1998
R. A. Harmon said:
> At 04:48 PM 8/13/98 -0700, you wrote:
> >R. A. Harmon writes:
> [snip]
> >You should try CrLfFileStream. It does exactly this for you, modulo
> >any err unexpected features.
> [snip]
>
> I've tried it and it is very well done. I believe it only fixes some of the
> areas of difficulty with like termination. Below are a couple of examples
> of areas it missed:
>
> Behavior>>#compile:notifying:
> . . .
> withPreamble: [:f |
> f cr; <- oops
> nextPut: $!;
> nextChunkPut: 'Behavior method';
> cr <- oops
> ].
>
> ChangeSet>>#fileOutOn:
> . . .
> stream cr. <- oops
>
> I haven't taken the time to see if these methods are even used, or root out
> all the places in all the source code where this occurs. It see important
> to me to do this because I'll write my methods using the CrLf (WinTel) but
> may in my code call a method that assumes a Cr (Mac) which calls a method
> that assumes a Lf (UNIX). I'll cast the painful-boil-on-the-typing-finger
> curse on the first programmer that decides to us the LfCr convention (hardly
> a big threat since it will be task 3,694th on my list).
>
Isn't this a place where a PoolDictionary would be useful? I think the
Digitalk version used CrLf as a key associated with the appropriate string
for separating lines. It gets initialized differently on each system?
Or doesn't Squeak have PoolDictionaries?
Oh!! -- Problem is, the appropriate separator for a given file depends not
on the system Squeak is running on, but the system the file was written
on...
Still, one might have a FileStream instance var that held the appropriate
value for that file?
joe
More information about the Squeak-dev
mailing list
|