home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!random.se!ianf
- Date: Wed, 26 Aug 92 08:14:58 +0100
- From: ianf@random.se (Ian Feldman)
- Newsgroups: comp.sys.mac.hypercard
- X-Hear: Sally's (Meg Ryan's) fake diner orgasm now available as plug-in
- X-This: charger sound for the Apple PowerBook; reason enough to buy one
- Apparently-To: rnews@sunet.se
- Message-ID: <a6c0edfe@random.se>
- X-Mailer: Fernmail 1.2b2
- Organization: random design -- "Opinions, cheaply"
- Lines: 36
- Summary: the target is the answer
- Subject: Finding flds under the clickLoc
-
-
- Jay L. Cross <by303@cleveland.Freenet.Edu> writes on Date: 26 Aug
- 92 01:59:37 GMT:
-
- > 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).
-
-
- Nothing could be easier to achieve. Simply put the following
- handler up the hierarchy of card(s) on thich those fields reside:
-
- on mouseDown ---------------------better use this instead of the mouseUp
- if "field" is in the target then --fields have to be locked to receive
- get the target ------------------mouse events and to pass them on(1)
- put "--field:" &"e &short name of it "e &"; ID:"[opt-return]
- &&id of it &"; #:" &&number of it -----will appear in the msg [demo]
- end if
- en mouseDown ---------------------not tested: may require some polishing
-
-
- (1) you'll have to decide if your need to find out the name, id
- and # of the fields is greater than your possible needs to allow
- easy data entry/ update of them. It is fully possible to have the
- fields locked by default, to be able to recognize and process
- mouse events like the above, yet still allow writing to them by
- unlocking them and relocking under script control
-
-
- --Ian "The HyperAgent[tm] From Beyond The Serial Port" Feldman
-