home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!nigel.msen.com!sdd.hp.com!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!keith@taligent.com
- From: keith@taligent.com (Keith Rollin)
- Subject: Re: vrefNum from Path Name
- Message-ID: <Bu39rF.1IJ@taligent.com>
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Organization: Taligent
- References: <47022@shamash.cdc.com> <Btwwt5.7Bv@taligent.com> <15143@claris.com>
- Distribution: usa
- Date: Sat, 5 Sep 1992 04:57:15 GMT
- Lines: 36
-
- In article <15143@claris.com>, wombat@claris.com (Scott Lindsey) writes:
- >
- > In article <Btwwt5.7Bv@taligent.com>, keith@taligent.com (Keith Rollin)
- writes:
- > >
- > > Remember, Inside Mac says that you should _NOT_ create FSSpecs by hand. You
- > > should always call FSMakeFSSpec. Don't go filling in the parID and vRefNum
- > > fields yourself. (There is one exception to this, which is that you can
- freely
- > > assign one FSSpec record to another.)
- >
- > Hmm. But what if you're under System 6 without FSSpec calls? In particular,
- > FTSend() requires an FSSpecArrayPtr, apparently without regard to whether
- > you're running System 6 or 7.
- > In this case I fill in the FSSpec by hand and hope that the FT tool can deal
- > with the fact that it can't use FSSpec calls to process the file referred to.
-
- What you're supposed to do here is go ahead and call FSMakeFSSpec. But before
- you do that, install your own custom SysError() handler. If you call
- FSMakeFSSpec and it's not implemented, your SysError handler will be called with
- dsCoreError, or unimplemented trap. Check for that, and then you can fill in the
- FSSpec record by hand.
-
- Actually, this could be tough, since debuggers and System 7 like to intercept
- SysError and put up pretty dialogs and stuff. If you encounter problems patching
- into SysError, you may just want to patch in at the A-Trap dispatcher level.
-
- Or you could just implement _HighLevelFSDispatch (trap AA52) yourself. Then
- you'd be obeying the rules when you called FSMakeFSSpec! Yeah, I like this idea
- the best. But then, I also like biting my toenails.
-
- --
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-
-