home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / hypercar / 3249 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  2.1 KB

  1. Path: sparky!uunet!mcsun!sunic!random.se!ianf
  2. Date: Wed, 26 Aug 92 08:14:58 +0100
  3. From: ianf@random.se (Ian Feldman)
  4. Newsgroups: comp.sys.mac.hypercard
  5. X-Hear: Sally's (Meg Ryan's) fake diner orgasm now available as plug-in
  6. X-This: charger sound for the Apple PowerBook; reason enough to buy one
  7. Apparently-To: rnews@sunet.se
  8. Message-ID: <a6c0edfe@random.se>
  9. X-Mailer: Fernmail 1.2b2
  10. Organization: random design -- "Opinions, cheaply"
  11. Lines: 36
  12. Summary: the target is the answer
  13. Subject: Finding flds under the clickLoc
  14.  
  15.  
  16.   Jay L.  Cross <by303@cleveland.Freenet.Edu> writes on Date: 26 Aug
  17.   92 01:59:37 GMT:
  18.  
  19. > I'm working on a stack with a background that has about 30 fields. 
  20. > I've got a "Find" command in the works, and I'd like the user to
  21. > be able to click on a field, and have the name, ID, or number of
  22. > that field "read".  I don't what to look for a mouse click in each
  23. > field.  I tried getting the clickChunk, which returns info
  24. > containing the field info, but if the user later clicks on a
  25. > button or other "non-field" area, this old clickChunk remains (you
  26. > can't put empty into the clickChunk). 
  27.  
  28.  
  29.   Nothing could be easier to achieve.  Simply put the following
  30.   handler up the hierarchy of card(s) on thich those fields reside:
  31.  
  32.  on mouseDown ---------------------better use this instead of the mouseUp
  33.    if "field" is in the target then --fields have to be locked to receive
  34.      get the target ------------------mouse events and to pass them on(1)
  35.      put "--field:" &"e &short name of it "e &"; ID:"[opt-return]
  36.      &&id of it &"; #:" &&number of it -----will appear in the msg [demo]
  37.    end if
  38.  en mouseDown ---------------------not tested: may require some polishing
  39.  
  40.  
  41. (1) you'll have to decide if your need to find out the name, id
  42.   and # of the fields is greater than your possible needs to allow
  43.   easy data entry/ update of them.  It is fully possible to have the
  44.   fields locked by default, to be able to recognize and process
  45.   mouse events like the above, yet still allow writing to them by
  46.   unlocking them and relocking under script control
  47.  
  48.  
  49. --Ian "The HyperAgent[tm] From Beyond The Serial Port" Feldman
  50.