home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20266 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!usc!news.cerf.net!benton.prepress.com!nuntius
  3. From: christopher m. knox <chris@benton.prepress.com>
  4. Subject: Re: Resource help?
  5. Message-ID: <1992Dec23.211340.19421@prepress.com>
  6. Sender: usenet@prepress.com (Usenet login)
  7. Nntp-Posting-Host: chris
  8. Organization: Pre-Press Technologies, Inc.
  9. X-Useragent: Nuntius v1.1b2
  10. References: <1h7hg5INNhmr@gap.caltech.edu>
  11. Date: Wed, 23 Dec 1992 21:13:40 GMT
  12. Lines: 25
  13.  
  14. In article <1h7hg5INNhmr@gap.caltech.edu> Chris Michael Ward,
  15. chriswd@cco.caltech.edu writes:
  16. >I was wondering if someone could help me out.  As a newtimer to Macintosh
  17. >programming, I am in the process of learning how to use resources.  I'm
  18. >trying to get the data from a simple 'STR#' resource, but it doesn't
  19. >seem to be working correctly.  
  20.  
  21. Hi,
  22. 'GetIndString(str,strListID,n);' will return the nth string in the STR#
  23. resource
  24. with id strListID. N ranges from 1... number of strings. (see IM I p.468).
  25. To do anything more, like inserting strings, the following info might
  26. help:
  27. format of a STR# resource:
  28. n, number of strings (2 bytes)
  29.  - m, length of string 1 (1 byte)
  30.  - characters of string 1 (m bytes)
  31.  ....
  32.  - m, length of string n
  33.  - characters of string n
  34.  
  35. Happy Holidays, Chris
  36. chris knox, primary programmer, SpectreTouch? 
  37.                                                     
  38. "Omne animal triste est post (or without) coitum"  Umberto Eco
  39.