home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / hypercar / 3391 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.2 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jv0l+
  2. From: jv0l+@andrew.cmu.edu (Justin Chris Vallon)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Message-passing question
  5. Message-ID: <gefDdzC00VokMNhUpJ@andrew.cmu.edu>
  6. Date: 8 Sep 92 11:09:51 GMT
  7. Article-I.D.: andrew.gefDdzC00VokMNhUpJ
  8. Organization: Senior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA
  9. Lines: 37
  10.  
  11. Hi.
  12.  
  13. I was wondering why the following hypercard script behaves as it does
  14. (using Hypercard 2.1):
  15.  
  16. Stack script:
  17.     function test2
  18.         return "stack script"
  19.     end test2
  20.  
  21.     function test
  22.         return test2()
  23.     end test
  24.  
  25. Background script:
  26.     function test2
  27.         return "background script"
  28.     end test2
  29.  
  30.  
  31. put test() places "stack script" in the message box.  Changing function
  32. test to:
  33.  
  34. on test
  35.     send "put test2()" to this card
  36. end test
  37.  
  38. causes an error (can't understand test2).  Is there any way to call a
  39. message handler defined in the background script from a message handler
  40. defined in the stack script?
  41.  
  42. Even removing the definition of function test2 from the stack script
  43. does not help at all.  The help stack is unclear or incorrect about the
  44. defined behavior of the given scripts.
  45.  
  46. -Justin
  47. jv0l+@andrew.cmu.edu
  48.