home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / oop / macapp3 / 568 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.3 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!agate!eos!data.nas.nasa.gov!taligent!apple!applelink.apple.com
  2. From: D4887@AppleLink.Apple.COM (Advanced Comm Eng, G G Apple,PRT)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re: Record -> Struct
  5. Message-ID: <727651813.9242251@AppleLink.Apple.COM>
  6. Date: 21 Jan 93 20:29:00 GMT
  7. Sender: daemon@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 21
  10.  
  11.  
  12.  
  13. ----------------------------------------------------------------------------
  14. >'(myRec)->HNo = "\p"' doesn't work. I get told that I can't assign a constant
  15. >to a variable. I've tried using combinations of CStr255, but to no avail.
  16.  
  17.  
  18.    I think you could probably use CStr31 which is a CString.  BTW, don't get
  19. confused by the name -- a "CString" is a Pascal string.
  20.  
  21.     Having just done a XCMD interface for a MacApp program (not starting from
  22. scratch, but from a version in Think C and assembly), handling all the
  23. callbacks was a major exercise in every possible string type and conversion
  24. technique.  When you give the string initialization, dont use the "\p".  I
  25. think the CString constructor will convert it properly,
  26.  
  27. G. Gordon Apple  D4887
  28.  
  29. P.S.  I don't guarantee this answer.  A lot of that XCMD callback string
  30. handling was determmined emperically, by guess and by golly.
  31.  
  32.