home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15029 < prev    next >
Encoding:
Text File  |  1992-09-07  |  2.1 KB  |  49 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. 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
  3. From: keith@taligent.com (Keith Rollin)
  4. Subject: Re: vrefNum from Path Name
  5. Message-ID: <Bu39rF.1IJ@taligent.com>
  6. Sender: usenet@taligent.com (More Bytes Than You Can Read)
  7. Organization: Taligent
  8. References: <47022@shamash.cdc.com> <Btwwt5.7Bv@taligent.com> <15143@claris.com>
  9. Distribution: usa
  10. Date: Sat, 5 Sep 1992 04:57:15 GMT
  11. Lines: 36
  12.  
  13. In article <15143@claris.com>, wombat@claris.com (Scott Lindsey) writes:
  14. > In article <Btwwt5.7Bv@taligent.com>, keith@taligent.com (Keith Rollin)
  15. writes:
  16. > > 
  17. > > Remember, Inside Mac says that you should _NOT_ create FSSpecs by hand. You
  18. > > should always call FSMakeFSSpec. Don't go filling in the parID and vRefNum
  19. > > fields yourself. (There is one exception to this, which is that you can
  20. freely
  21. > > assign one FSSpec record to another.)
  22. > Hmm.  But what if you're under System 6 without FSSpec calls?  In particular,
  23. > FTSend() requires an FSSpecArrayPtr, apparently without regard to whether
  24. > you're running System 6 or 7.
  25. > In this case I fill in the FSSpec by hand and hope that the FT tool can deal
  26. > with the fact that it can't use FSSpec calls to process the file referred to. 
  27.  
  28. What you're supposed to do here is go ahead and call FSMakeFSSpec. But before
  29. you do that, install your own custom SysError() handler. If you call
  30. FSMakeFSSpec and it's not implemented, your SysError handler will be called with
  31. dsCoreError, or unimplemented trap. Check for that, and then you can fill in the
  32. FSSpec record by hand.
  33.  
  34. Actually, this could be tough, since debuggers and System 7 like to intercept
  35. SysError and put up pretty dialogs and stuff. If you encounter problems patching
  36. into SysError, you may just want to patch in at the A-Trap dispatcher level.
  37.  
  38. Or you could just implement _HighLevelFSDispatch (trap AA52) yourself. Then
  39. you'd be obeying the rules when you called FSMakeFSSpec! Yeah, I like this idea
  40. the best. But then, I also like biting my toenails.
  41.  
  42. --
  43. Keith Rollin
  44. Phantom Programmer
  45. Taligent, Inc.
  46.  
  47.