home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21122 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  2.9 KB

  1. Path: sparky!uunet!ogicse!emory!wupost!darwin.sura.net!news.udel.edu!chopin.udel.edu!kurisuto
  2. From: kurisuto@chopin.udel.edu (Sean J. Crist)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: HOpenResFile and HOpenRF supported by glue in System 6?
  5. Message-ID: <C0nBF7.I2C@news.udel.edu>
  6. Date: 10 Jan 93 16:06:43 GMT
  7. Article-I.D.: news.C0nBF7.I2C
  8. References: <1993Jan9.201619.1240@netcom.com> <C0Ltw3.FrH@news.udel.edu> <1993Jan10.060648.3821@netcom.com>
  9. Sender: usenet@news.udel.edu
  10. Organization: University of Delaware
  11. Lines: 43
  12. Nntp-Posting-Host: chopin.udel.edu
  13.  
  14. In article <1993Jan10.060648.3821@netcom.com> jimlynch@netcom.com (Jim Lynch) writes:
  15. >In article <C0Ltw3.FrH@news.udel.edu> kurisuto@chopin.udel.edu (Sean J. Crist) writes:
  16. >>Well, the title basically says it all: are all of the various H... calls
  17. >>supported by glue when my application is running in System 6.x?  IM VI
  18. >>documents these calls (pg. 23-36) but doesn't make it clear when these calls
  19. >>began to be supported. (HOpenRF didn't exist in IM IV, where it was a
  20. >>low-level call.)  I want to support both System 6 and 7, which means I can't
  21. >>use the FS... calls, but I also don't want to use the old calls which don't
  22. >>support a dirID.
  23. >
  24. >Question: Is this accurate, the FS... file system calls don't work under system
  25. >7? Or, are there other reasons to avoid them in syst. 7?
  26.  
  27. Sorry, I didn't word that very clearly.  System 7 supports the FS calls;
  28. System 6 does not, so if you want to support both 6 and 7 you can't use
  29. the FS calls.  If your application is System 7 dependant it is fine to use
  30. the FS calls.
  31.  
  32. As someone pointed out to me in an email message, FSSpec is just a data
  33. structure, and it's fine for your application to use it internally to keep
  34. track of files under System 6 or 7.  Yesterday I went through and changed
  35. my application to do this, and I think it has made for a lot cleaner design.
  36.  
  37. I think the discussion of file specification schemes in IM VI would be a
  38. whole lot clearer if it started by saying that the best way to specify a
  39. file is with a VRefNum, a DirID (called parID in FSSpec), and a filename,
  40. and nothing less. If the Macintosh were invented today this would be the
  41. only way to specify a file; all other schemes (such as using a 'working
  42. VRefNum' to stand for both a real VRefNum and a DirID) are obsolete and
  43. only exist for backward compatibility.  If you do receive an old-style
  44. file specification (as from SFGetFile and SFPutFile), you should
  45. immediately call GetWDInfo to convert it to the new scheme.
  46.  
  47. I wish someone would have made this clear sooner!
  48.  
  49. --Kurisuto
  50.  
  51. P.S. A few people told me that FindFolder is supported by glue under
  52. System 6 by both Think and MPW.  This must mean Think C but not Think
  53. Pascal 4.0, because I got an unimplemented trap error when I called it
  54. under System 6.  So I'm calling Gestalt to see if FindFolder is available,
  55. and if it isn't I'm using the old scheme of calling SysEnvirons and
  56. GetWDInfo to find the System Folder.
  57.