home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / hypercar / 3203 < prev    next >
Encoding:
Internet Message Format  |  1992-08-23  |  1.5 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!jkc
  2. From: jkc@Apple.COM (John Kevin Calhoun)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: Sending AEs to hypercard
  5. Message-ID: <71521@apple.Apple.COM>
  6. Date: 22 Aug 92 17:35:20 GMT
  7. References: <EeYJUtS00iUx04XlJV@andrew.cmu.edu> <1992Aug22.001928.27498@kronos.arc.nasa.gov>
  8. Organization: Apple Computer Inc., Cupertino, CA
  9. Lines: 31
  10.  
  11.  
  12. In article <1992Aug22.001928.27498@kronos.arc.nasa.gov>
  13. joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91) writes:
  14. >                          [...] I'll GIVE you guys this completely
  15. >working code.  It sends a string to hypercard
  16. >to be interpreted as a script.  I never got as far as getting hypercard
  17. >to return a message like OK or ERROR,though (or maybe
  18. >I check for it wrong -- I dont know).
  19.  
  20. Thanks very much for posting this.  Here's how to get information back
  21. from HyperCard.
  22.  
  23. HyperCard will report errors in the reply parameter with keyword
  24. keyErrorString, not keyErrorNumber.  So, in your code, change this:
  25.  
  26. >   myError = AEGetParamPtr( &theReply, keyErrorNumber, typeLongInteger,
  27. &actualType,
  28.  
  29. to this:
  30.  
  31.     myError = AEGetParamDesc( &theReply, keyErrorString, typeChar, 
  32.  
  33. If myError indicates that there is no such parameter, then there was no
  34. error in executing the script.
  35.  
  36. You can get computed data back from HyperCard as well.  When the script
  37. has been executed, if there's anything contained in "the result" HyperCard
  38. will send it back to you in the direct parameter of the reply.
  39.  
  40. Kevin Calhoun
  41. jkc@apple.com
  42.