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

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!news.weeg.uiowa.edu!smills
  3. From: smills@news.weeg.uiowa.edu (MuffinHead)
  4. Subject: Re: Finding flds under the clickLoc
  5. Message-ID: <1992Aug27.053823.28494@news.weeg.uiowa.edu>
  6. Organization: University of Iowa, Iowa City, IA, USA
  7. References: <1992Aug26.015937.28679@usenet.ins.cwru.edu>
  8. Date: Thu, 27 Aug 1992 05:38:23 GMT
  9. Lines: 37
  10.  
  11. by303@cleveland.Freenet.Edu (Jay L. Cross) writes:
  12.  
  13. >I'm working on a stack with a background that has about 30
  14. >fields.  I've got a "Find" command in the works, and I'd like
  15. >the user to be able to click on a field, and have the name, ID,
  16. >or number of that field "read".  I don't what to look for a 
  17. >mouse click in each field.  I tried getting the clickChunk,
  18. >which returns info containing the field info, but if the user
  19. >later clicks on a button or other "non-field" area, this old
  20. >clickChunk remains (you can't put empty into the clickChunk).
  21. >So, how do I find out what field the mouse pointer is over?
  22. >I know I've read this on the net before, but I can't find the
  23. >message...
  24.  
  25.    Try getting 'the target'. I haven't used that much, so I don't know if
  26. it'll work like you want it to. Or, have two scripts in each field:
  27.  
  28. on mouseEnter
  29.   global theField
  30.   put the short name of me into theField
  31.   --or
  32.   --put "<field name>" into theField  --where <field name> is the name of
  33.   --each field.
  34. end mouseEnter
  35.  
  36. on mouseLeave
  37.   global theField
  38.   put empty into theField
  39. end mouseLeave
  40.  
  41.    Then have a script in the background layer:
  42.  
  43. on mouseDown
  44.   global theField
  45.   --do whatever with theField
  46. end mouseDown
  47.