home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5346 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!psinntp!afs!greg
  3. From: greg@afs.com (Gregory H. Anderson)
  4. Subject: Re: Formcell behaviour
  5. Message-ID: <1992Jul28.221831.365@afs.com>
  6. Sender: greg@afs.com
  7. Reply-To: greg@afs.com
  8. References: <1992Jul27.132231.19873@monu6.cc.monash.edu.au>
  9. Date: Tue, 28 Jul 1992 22:18:31 GMT
  10. Lines: 30
  11.  
  12. In article <1992Jul27.132231.19873@monu6.cc.monash.edu.au>  
  13. ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
  14.  
  15. > I have a form and one of the formCells connected to a validateField  
  16. method. I have a number of buttons which are enabled only if the fields  
  17. are valid.  When I type in the formcell (not pressing return) or click  
  18. into another cell or even _OUTSIDE_ the form the action is not sent.  
  19. WHY!!!!!.
  20. Because this object is braindead.  8^)
  21.  
  22. Seriously, only an actual <CR> forces the action method. This is a Bad  
  23. Thing, because I have watched many users not bother to hit any field  
  24. movement key after they finish typing a field. If the next thing they hit  
  25. is the Save button, the last field never gets a chance to validate.
  26.  
  27. For what you want, the matrix which contains the FormCells must have a  
  28. text delegate, and then you must use the delegate methods (textWillEnd:,  
  29. textDidGetKeys:, etc.) to validate as they type. Even with this procedure,  
  30. the delegate methods seems to jump off at different points depending on  
  31. whether the keyboard (Tab, Shift-Tab, etc.) or the mouse is used to  
  32. trigger the next field. The bottom line is, only textDidGetKeys: and  
  33. textDidEnd: are reliable indicators of keystrokes and field movement under  
  34. all circumstances.
  35.  
  36. --
  37. Gregory H. Anderson          | "We're very tolerant around here,
  38. Benevolent Dictator-for-Life |  being only amateurs ourselves."
  39. Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
  40. greg@afs.com  (Nextmail OK)  | 
  41.