home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18436 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.6 KB  |  33 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!usc!wupost!csus.edu!netcom.com!leonardr
  3. From: leonardr@netcom.com (Leonard Rosenthol)
  4. Subject: Re: How to store file references/names ?
  5. Message-ID: <1992Nov15.172919.10970@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. References: <1e5fvgINN835@uni-paderborn.de>
  8. Date: Sun, 15 Nov 1992 17:29:19 GMT
  9. Lines: 22
  10.  
  11. In article <1e5fvgINN835@uni-paderborn.de> jerry@uni-paderborn.de writes:
  12. >What is the best (easiest?) way to store file informations in a preferences
  13. >file?   My application reads an initialization file on startup and I want
  14. >to give the user the possibility to choose what file should be read.
  15. >I've heard that I should NOT try to store entire file names.   Can I simply 
  16. >bring up a file dialog and the store the file reference number?   Or does 
  17. >this number change as files and directories change on the hard disk?
  18. >
  19.     If you are a System 7 only product, then the best way would be to
  20. create an alias to the file (via NewAlias) and then store the aliasHandle
  21. in your prefs file.  If not, or if you will be working on both 6 & 7, then
  22. you need to create a new data structure which will store a volume NAME (
  23. volume reference numbers (vRefNums) are not valid across boots), a directory
  24. ID (dirID) and a file name.  With that information you can get back to those
  25. files.
  26.  
  27. -- 
  28. -----------------------------------------------------------------------------
  29. Leonard Rosenthol            Internet:     leonardr@netcom.com
  30. Director of Advanced Technology        AppleLink:    MACgician
  31. Aladdin Systems, Inc.            GEnie:        MACgician
  32.  
  33.