Newbie: X-platform question

Tim Rowledge tim at sumeru.stanford.edu
Sat Dec 27 18:33:40 UTC 2003


Gary Fisher <gafisher at sprynet.com> wrote:

> It's trivial perhaps, but very significant: Squeak is profoundly 
> cross-platform, the beauty of the Virtual Machine concept.  Your application 
> will neither know nor care whether it's running on a Mac, a PC, or any of the 
> many other Squeak platforms.
Almost, but not quite completely true; there is at least one area where
the platform can be felt fairly painfully - filenames.

If your code embeds anything like a detail of a filename - say
myFile:= FileStream oldFileNamed:'c:foo\bar\wibble.exe'
then you are completely and utterly screwed if you try to run on a Mac.
Never, never, wrote code like this. Well, unless it is intended to test
some other code that is supposed to do something useful with the errors
it will cause.

For the directory separators use 'FileDirectory slash'. For sanity, try
to live with your files in directories under the current  directory -
what you get from 'FileDirectory default'. Yes, these are annoying
problems and we keep bemoaning them but so far no accepted fix has
arisen. Several decent ideas have been suggested but none of them are
yet in the sytem.

Oh, and platform specific things like Word and Excel files won't be of
enormous use unless you are intending to use some FFI calls to spawn
the appropriate application with them.


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Do you like me for my brain or my baud?



More information about the Squeak-dev mailing list