home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14860 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!kth.se!byse.nada.kth.se!d88-jwa
  3. From: d88-jwa@byse.nada.kth.se (Jon W{tte)
  4. Subject: Re: Beginner's question on StandardPutFile
  5. In-Reply-To: ewu1@husc8.harvard.edu's message of 1 Sep 92 12:01:59 GMT
  6. Message-ID: <D88-JWA.92Sep2001056@byse.nada.kth.se>
  7. Originator: d88-jwa@byse.nada.kth.se
  8. Sender: usenet@kth.se (Usenet)
  9. Nntp-Posting-Host: byse.nada.kth.se
  10. Organization: Royal Institute of Technology, Stockholm, Sweden
  11. References: <ewu1.715348919@husc8>
  12. Date: Tue, 1 Sep 1992 23:10:56 GMT
  13. Lines: 29
  14.  
  15. @husc8.harvard.edu (Elwin Wu) writes:
  16.  
  17.    I'm having trouble getting the volume reference number returned by the
  18.    StandardPutFile routine.  I want to use SetVol and my code typically
  19.    looks something like this (I'm using Think C 5.0):
  20.  
  21.        StandardPutFile(prompt,defaultName,&theReply);
  22.        SetVol(theReply.sfFile.vRefNum);
  23.  
  24.    Should I use something other that SetVol???  Any help would be
  25.    appreciated.  Thanks
  26.  
  27.  
  28. Why on EARTH would you do this?
  29.  
  30. You're on System 7, since you use StandardPutFile, and there is
  31. not a single thing under System 7 that requires a volume or wdRefNum.
  32.  
  33. Use the FSpCalls; they're there for you and the FSSpec returned
  34. in theReply is all you need. (If you want to do a SetVol to open
  35. a file using fopen:
  36. 1) Don't use fopen since it stinks on the mac... or
  37. 2) Do a HGetVol, HSetVol, fopen, and HSetVol back to what you
  38.    got from HGetVol)
  39.  
  40. -- 
  41. Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
  42. White, Literate, Employed, Higher-Educated, Male, Straight and Not Poor.
  43. I must be a bad guy.
  44.