[Cuis] FileDirectory >> currentDirectory and FileDirectory >> default

Juan Vuletich juan at jvuletich.org
Tue Jun 23 08:31:51 CDT 2015


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 
SqueakCompatibility.pck.st. 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.

Cheers,
Juan Vuletich




More information about the Cuis mailing list