home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.hypercard
- 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
- From: smills@news.weeg.uiowa.edu (MuffinHead)
- Subject: Re: Finding flds under the clickLoc
- Message-ID: <1992Aug27.053823.28494@news.weeg.uiowa.edu>
- Organization: University of Iowa, Iowa City, IA, USA
- References: <1992Aug26.015937.28679@usenet.ins.cwru.edu>
- Date: Thu, 27 Aug 1992 05:38:23 GMT
- Lines: 37
-
- by303@cleveland.Freenet.Edu (Jay L. Cross) writes:
-
- >I'm working on a stack with a background that has about 30
- >fields. I've got a "Find" command in the works, and I'd like
- >the user to be able to click on a field, and have the name, ID,
- >or number of that field "read". I don't what to look for a
- >mouse click in each field. I tried getting the clickChunk,
- >which returns info containing the field info, but if the user
- >later clicks on a button or other "non-field" area, this old
- >clickChunk remains (you can't put empty into the clickChunk).
- >
- >So, how do I find out what field the mouse pointer is over?
- >I know I've read this on the net before, but I can't find the
- >message...
-
- Try getting 'the target'. I haven't used that much, so I don't know if
- it'll work like you want it to. Or, have two scripts in each field:
-
- on mouseEnter
- global theField
- put the short name of me into theField
- --or
- --put "<field name>" into theField --where <field name> is the name of
- --each field.
- end mouseEnter
-
- on mouseLeave
- global theField
- put empty into theField
- end mouseLeave
-
- Then have a script in the background layer:
-
- on mouseDown
- global theField
- --do whatever with theField
- end mouseDown
-