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

  1. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!rsoft!mindlink!a347
  2. From: John_Miller@mindlink.bc.ca (John Miller)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: Trapping messages between windows?
  5. Message-ID: <14344@mindlink.bc.ca>
  6. Date: 17 Aug 92 20:23:07 GMT
  7. Organization: MIND LINK! - British Columbia, Canada
  8. Distribution: world
  9. Lines: 42
  10.  
  11. In message <1992Aug17.070911.10151@usage.csd.unsw.OZ.AU>,
  12. cnquinn@spectrum.cs.unsw.oz.au (Clark Quinn) writes
  13. > While talking to two of my students who are working on an
  14. > adventure game implementation, we came across an interesting
  15. > bit of HyperCard behavior we were wondering if anyone could
  16. > illuminate:
  17.  
  18. ...
  19.  
  20. >  on mouseStillDown
  21. >    set loc of button "New Button" to the mouseLoc
  22. >  end mouseStillDown
  23. >
  24. >  on mouseUp
  25. >    beep
  26. >  end mouseUp
  27.  
  28.     [no beep]
  29.  
  30. >  on mouseDown
  31. >    repeat while the mouse = "down"
  32. >      set loc of button "New Button" to the mouseLoc
  33. >    end repeat
  34. >  end mouseDown
  35.  
  36.    [combined with the above mouseUp handler always causes a beep]
  37.  
  38. This is a HyperCard quirk.  If your mouseDown handler
  39. uses a "repeat while the mouse is down" loop,
  40. the mouseUp message is always sent when the mouse is
  41. released, even if the mouse has been moved outside
  42. the button before release.  This was also true
  43. in HyperCard 1.2.5.
  44.  
  45. It would probably be best to avoid relying on
  46. this quirk.  Perhaps all the processing
  47. should go in your mouseDown handler.
  48.  
  49. John Miller
  50. Symplex Systems
  51.  
  52.  
  53.