[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] startup disk



Ken Cartner writes:
> I'm trying to set a variable to a folder inside the Preferences folder of
> the system folder. As long as I use the hard drive's name in the path,
> everything works fine.

I'm sorry; my earlier article was misguided and David and Chris are right: You
should use FindFolder, not MacPerl::Volumes. However, if at all possible
(PowerPC or BigMacPerl) you should use Mac::Files instead of FindFolder.pl:

use Mac::Files;

$preferencess = FindFolder kOnSystemDisk, kPreferencesFolderType;

If you hardcode the name of the System Folder or the Preferences folder, you
will risk the destruction of earth by a fleet of spaceships the first time
somebody tries to use your code on a Mac running the Klingon version of MacOS.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "Have you considered that if you take the list of things you assume and
   invert it you would get a far more useful set of assumptions?"
                                     -- Richard Caley



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch