home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20883 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.7 KB  |  45 lines

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