home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / hypercar / 3145 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.8 KB  |  40 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!usc!cs.utexas.edu!asuvax!ncar!ncar.ucar.edu!hpoppe
  3. From: hpoppe@ncar.ucar.edu (Herb Poppe)
  4. Subject: Re: Validating Data Entry in a Field
  5. Message-ID: <1992Aug18.215256.1379@ncar.ucar.edu>
  6. Sender: news@ncar.ucar.edu (USENET Maintenance)
  7. Organization: Scientific Computing Division/NCAR Boulder, CO
  8. Date: Tue, 18 Aug 1992 21:52:56 GMT
  9. Lines: 29
  10.  
  11. In article <1992Aug18.203434.25218@ncar.ucar.edu> urban@stout.atd.ucar.edu 
  12. (Art Urban (PROFS)) writes:
  13. > In article <1992Aug18.202825.24625@ncar.ucar.edu> hpoppe@ncar.ucar.edu 
  14. (Herb Poppe) writes:
  15. > %by typing TAB or RETURN or ENTER. However, I see no convenient way to 
  16. trap 
  17. > %the user's clicking a button, in another field, or in the card, thus 
  18. > %leaving an invalid value left in the field. Have a missed an obvious 
  19. (or 
  20. > %not so obvious) approach to this issue?
  21.  
  22. > If I'm not mistaken (I haven't tried this) the exitField handler does 
  23. what
  24. > you want. It is called every time the cursor leaves the field, *even* if
  25. > the the field data is unchanged.
  26.  
  27. The problem is that there is no way (that I have found) to force the 
  28. cursor back into the field using the closeField (or exitField) handler. It 
  29. seems to me that I am going to have to trap every mouseUp sent to the card 
  30. or button and every openField sent to other unlocked fields as a result of 
  31. clicking outside of the field in error. That handler (in the card) will 
  32. have to check if there is an error pending in a field. If there is, it 
  33. will put the insertion point back in that field. If not, it will send a 
  34. "myMouseUp" message back to the target of the mouse click. Similarly for 
  35. openField.
  36.  
  37. Herb Poppe                 National Center for Atmospheric Research (NCAR)
  38. hpoppe@ncar.ucar.edu       1850 Table Mesa Dr.
  39. (303) 497-1296             Boulder, CO  80303
  40.