[GOODIE] Chicken Run

Bob Arning arning at charm.net
Fri Oct 20 16:22:35 UTC 2000


On Fri, 20 Oct 2000 17:56:37 +0200 (CEST) Bert Freudenberg <bert at isg.cs.uni-magdeburg.de> wrote:
>> On Fri, 20 Oct 2000 17:36:17 +0200 (CEST) Bert Freudenberg <bert at isg.cs.uni-magdeburg.de> wrote:
>> >Just curious: would this work, too?
>> >
>> >	imageDir := FileDirectory default
>> >		directoryNamed: 'chicken', FileDirectory slash , 'images'.
>>
>> No, but this does:
>> 
>> FileDirectory default
>> 		directoryNamed: FileDirectory slash,'chicken', FileDirectory slash , 'images'.
>
>Uh, that's odd. I'd even say that's a bug. If
>	FileDirectory default directoryNamed: 'chicken'
>works, without a leading slash, my code above should work too.
>On Unix, your code will produce an absolute path to '/chicken/image'. So
>who's wrong? ;)

Bert,

I suspect the problem is in exposing too much of the semantics of the OS. On the Mac, IIRC, a path which begins with a colon (the separator) is relative to the current directory while one this contains a colon, but not at the beginning, is fully qualified. I imagine these rules have carried over into the Mac Squeak VM. For me

FileDirectory default ===> MacFileDirectory on 'BobsG3:squeak:email28'

while I suspect yours would be something like '/usr/squeak/...'. While we could probably make these paths work the same across all platforms, I prefer a more abstract protocol that hides this messiness.

Cheers,
Bob





More information about the Squeak-dev mailing list