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