home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / hypercar / 4798 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.6 KB  |  81 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!joshr
  3. From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
  4. Subject: AE's and hypercard
  5. Message-ID: <1993Jan13.031644.6956@kronos.arc.nasa.gov>
  6. Sender: usenet@kronos.arc.nasa.gov (Will Edgington, wedgingt@ptolemy.arc.nasa.gov)
  7. Nntp-Posting-Host: mcc2.arc.nasa.gov
  8. Organization: NASA/ARC Information Sciences Division
  9. Date: Wed, 13 Jan 1993 03:16:44 GMT
  10. Lines: 69
  11.  
  12. Newsgroups: comp.sys.mac.hypercard
  13. Subject: AE's / bringing hypercard to foreground
  14. Summary: 
  15. Expires: 
  16. Sender: 
  17. Followup-To: 
  18. Distribution: world
  19. Organization: NASA/ARC Information Sciences Division
  20. Keywords: 
  21.  
  22. Hey all:
  23.  
  24. I am trying to get hypercard to post an error message from the background.
  25.  
  26. The situation is thus:  HC is sent a dosc
  27. appleevent which it interprets.  99% of this time this works just
  28. fine, and hypercard does not need to return a message (though
  29. an empty string or "no error" would benice).  But occasionally,
  30. the script will contain a comand HC cannot support, and
  31. HC will use the notifiacation manager (blinking multifinder 
  32. icon in upper right) to get the user to switch programs.  When HC
  33. is brought to the foreground, it then displays its error
  34. message.
  35.  
  36. What I want is one of the following
  37.  
  38. 1) (preferred, but difficult)  Hypercard detects that it is in the 
  39. background, and returns an error message to the client.  I know
  40. how to do this in hypercard (reply "STRING" in on AppleEvent handler),
  41. but I am unclear on how I unpackage it in my app 
  42. (using TCL).  I seem to always get error -1707, AE not handled 
  43. (not sure about number, but AE not handled is the error message.  The
  44.   strange part is that hypercard most definitely DID handle the AE,
  45.   though mey not have returned a result (correctly).
  46.  
  47. 2) (easier, HELP)  Hypercard brings itself to the foreground and
  48. diplays the message.  I thought this would be easy:
  49.  
  50. on AppleEvent 
  51.    ...
  52.    if the result is not empty then
  53.       open hypercard -- I hoped this would cause MF switch, but does not
  54.    end if
  55. end AppleEvent
  56.  
  57. ... but "open hypercard" does not deem to bring it to the front as it 
  58. would with other operations.
  59.  
  60.  
  61. SO:  HOW DO I GET HYPERCARD TO BRING ITSELF INTO THE FOREGROUND?
  62.  
  63. It is not beyond me to write an XCMD if _needed_.
  64.  
  65.  
  66. THANK YOU VERY MUCH.
  67. joshr@kronos.arc.nasa.gov
  68.  
  69.  
  70. PS - has anyone written a 'eval' sender from C?  I would be real glad
  71. to see it, or talk to them.
  72.  
  73.  
  74.  
  75.  
  76. -- 
  77. ----------------------------------
  78. #include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
  79. joshr@kronos.arc.nasa.gov
  80. "Me lost my cookie at the disco." -- Cookie Monster
  81.