FileDirectory >> currentDirectory and FileDirectory >> default

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FileDirectory >> currentDirectory and FileDirectory >> default

Juan Vuletich-4
Hi Folks,

When using Cuis for writing script friendly applications (see
AppLauncher ), I had problems with the assumption that 'FileDirectory
default' answers the directory where the image is saved. What is wanted
is the 'current directory' in the OS shell where Cuis whas started. I
just went ahead and changed it. Now we have:

- FileDirectory currentDirectory . Should be the current directory in
the calling OS shell. In some cases it might equal #smalltalkImageDirectory

- FileDirectory smalltalkImageDirectory . Like the old FileDirectory default

- FileDirectory vmDirectory . Where the VM is

Another change is how to treat relative directories and simple filenames
(like Form fromFileNamed: 'some.bmp' ) . Now these are assumed to be
inside (or relative to) FileDirectory currentDirectory. I also removed
#default from FileDirectory class, and moved it to But, for consistency, I made it also mean
FileDirectory currentDirectory.

Finally, I made all Smalltalk tools refer explicitly to FileDirectory
smalltalkImageDirectory , to keep their existing behavior.

All this makes it easier to write scriptable apps, and is more explicit
and clear. I expect very little (or no) code to break for all these
changes. But If something breakes, you know who to blame.

Juan Vuletich

Cuis mailing list
[hidden email]