🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.oop.macapp3
Article #304

Re: Record -> Struct

#304
From: Advanced Comm Eng, G G Apple,PRT
Date: Thu, 21 Jan 1993 20:29
21 lines
1312 bytes
 
----------------------------------------------------------------------------
>'(myRec)->HNo = "\p"' doesn't work. I get told that I can't assign a constant
>to a variable. I've tried using combinations of CStr255, but to no avail.
 
 
   I think you could probably use CStr31 which is a CString.  BTW, don't get
confused by the name -- a "CString" is a Pascal string.
 
    Having just done a XCMD interface for a MacApp program (not starting from
scratch, but from a version in Think C and assembly), handling all the
callbacks was a major exercise in every possible string type and conversion
technique.  When you give the string initialization, dont use the "\p".  I
think the CString constructor will convert it properly,
 
G. Gordon Apple  D4887
 
P.S.  I don't guarantee this answer.  A lot of that XCMD callback string
handling was determmined emperically, by guess and by golly.
 
Technical Details
Message-ID: <727651813.9242251@AppleLink.Apple.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ames!agate!eos!data.nas.nasa.gov!taligent!apple!applelink.apple.com

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ames!agate!eos!data.nas.nasa.gov!taligent!apple!applelink.apple.com
From: D4887@AppleLink.Apple.COM (Advanced Comm Eng, G G Apple,PRT)
Newsgroups: comp.sys.mac.oop.macapp3
Subject: Re: Record -> Struct
Message-ID: <727651813.9242251@AppleLink.Apple.COM>
Date: 21 Jan 93 20:29:00 GMT
Sender: daemon@Apple.COM
Organization: AppleLink Gateway
Lines: 21