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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!sunic!kth.se!news.kth.se!ulfis
  3. From: ulfis@cyklop.nada.kth.se (Anders Ulfheden)
  4. Subject: UseResFile() problems with CTB Tools
  5. Message-ID: <ULFIS.92Sep8005218@cyklop.nada.kth.se>
  6. Sender: usenet@kth.se (Usenet)
  7. Nntp-Posting-Host: cyklop.nada.kth.se
  8. Organization: Royal Institute of Technology, Stockholm, Sweden
  9. Distribution: comp
  10. Date: Mon, 7 Sep 1992 23:52:18 GMT
  11. Lines: 31
  12.  
  13. I have a document from Apple (by Craig Hotchkiss and Chris Halim) that
  14. describes some hints when creating your own Choose dialog:
  15.  
  16. ...
  17. Save CurResFile().
  18. Save the current grafPtr.
  19. Set the new grafPtr to the dialog.
  20. Set CurResFile() to the procID of the tool we're working with (the tool procID
  21.     is also the refNum of the open file).
  22. ...
  23.  
  24. But when I check with ResError() after UseResFile((**toolHandle).procID) I get
  25. error resFNotFound (-193) Resource file not found. Can anyone explain why?
  26. The tools handle is valid and the code works fine without UseResFile() stuff.
  27.  
  28. Now, I really want to use the refNum to the actual tool and read some font
  29. resources. Do I manually have to locate the tool before doing this?
  30.  
  31. Thanks for any help!
  32.  
  33. ulfis
  34.  
  35. PS: Thanks to all of you netters that helped me earlier with strange font and
  36.     sizes in the Choose dialog. I'll post the complete code to the net when
  37.     it's done and works! DS.
  38. --
  39. +------------------------------------------------------------------------------
  40. |  Anders Ulfheden
  41. |  USENET:  ulfis@nada.kth.se        AppleLink: SW0429
  42. |  Royal Institute of Technology
  43. |  Stockholm, Sweden
  44.