home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!munnari.oz.au!uniwa!cujo!peter
- From: peter@cujo.curtin.edu.au (Peter N Lewis)
- Subject: Re: Setting Default Directory
- Message-ID: <1993Jan7.143742.15258@cujo.curtin.edu.au>
- Organization: Curtin University of Technology
- References: <1iejtiINN8no@rave.larc.nasa.gov>
- Date: Thu, 7 Jan 1993 14:37:42 GMT
- Lines: 34
-
- wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
-
- >Given the following FSSpec record:
-
- > vRefNum - volume reference number
- > parID - directory ID of parent directory
- > name - DIRECTORY name
-
- >How can I set the default directory to FSSpec.name? In other words, I have a
- >routine that allows a user to select folder name instead of a file name and
- >I want that folder to be the default directory. I am using this routine with
- >an existing MacFortran application which expects all files used with Fortran
- >reads and writes to be in the default directory. IM VI states that it can be
- >done, but never explains how to do it.
-
- Jon described how to set the default directory, but there is often a lot
- of confusion between the default directory and the directory displayed
- by the StandardFile package. If you want to set the StandardFile
- package's displayed directory, you do so by setting the low memory
- globals:
- SFSaveDisk=$214;
- CurDirStore=$398;
-
- Set SFSaveDisk to -vRefNum and CurDirStore to the dirID of the folder.
- To get the dirID of the folder, use PBGetCatInfo (be careful, there are
- two dirID's in the paramblock, ioDrDirID&ioDrParID, one is right, and
- one is wrong :-)
-
- Have fun,
- Peter.
-
- --
- _______________________________________________________________________
- Peter N Lewis <peter@ncrpda.curtin.edu.au> Ph: +61 9 368 2055
-