home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / hypercar / 4117 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.7 KB  |  50 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!decwrl!decwrl!apple!mumbo.apple.com!gallant.apple.com!kip2-16.apple.com!user
  2. From: athos@apple.com (Rick Eames)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: New to XCMDs in 'C' - How to begin
  5. Message-ID: <athos-071192101220@kip2-16.apple.com>
  6. Date: 7 Nov 92 18:12:10 GMT
  7. References: <1992Nov6.213246.8511@agt.uucp>
  8. Sender: news@gallant.apple.com
  9. Followup-To: comp.sys.mac.hypercard
  10. Organization: Apple Computer, Inc.
  11. Lines: 37
  12.  
  13. In article <1992Nov6.213246.8511@agt.uucp>, Allen Winter
  14. <AWINTER1@agt.ab.ca> wrote:
  15. > I am using THINK c V5.0 and I want to learn how to write XCMDs .  But I
  16. > am having trouble just getting to 1st base.
  17. > I have looked at the source  code in 'XCMD Shell' and also 'XcShell' -
  18. > hoping
  19. > that they would serve as examples.  But they look awfully complicated and 
  20. > also they will not compile on THINK C V5.0.  For one thing I don'tseem to
  21. > have all 
  22. > of the headers needed, such as 'MacTypes.h' etc.  Also there are
  23. > different 
  24. > versions of 'XCMDUtil.c' and also 'HyperXcmd.h'.
  25. > Can anyone provide me with either source code for a simple XCMD that 
  26. > WILL compile (including headers and utility files)? 
  27.  
  28. Here is about as simple as they get:
  29.  
  30. #include <HyperXCmd.h>
  31.  
  32. pascal void main(XCmdPtr pp)
  33. {
  34.     pp->returnValue = PasToZero(pp, "\pThis is a test.");
  35. }
  36.  
  37. 1) Create a project with this source and the MacTraps Lib and the HyperXLib
  38. included.  Compile as either XCMD or XFCN code resource.
  39.  
  40. Be the ball.
  41.  
  42. ******************************************************************************
  43. Rick Eames                               My Opinions Are My Own (not
  44. Apple's)
  45. athos@apple.com
  46. ******************************************************************************
  47.