home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5345 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.8 KB  |  40 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.222721.422@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:27:21 GMT
  10. Lines: 28
  11.  
  12. In article <1992Jul27.132231.19873@monu6.cc.monash.edu.au>  
  13. ede978e@monu6.cc.monash.edu.au (Robert D. Nicholson) writes:
  14. > I have a form and one of the formCells connected to a validateField  
  15. method. I have a number of buttons which are enabled only if the fields  
  16. are valid.  When I type in the formcell (not pressing return) or click  
  17. into another cell or even _OUTSIDE_ the form the action is not sent.  
  18. WHY!!!!!.
  19. >
  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 t hey finish typing in a field. If the next thing they  
  25. hit is the Save button, the last field never gets a chance to validate.  
  26. IMHO, any inter-field movement should trigger the action method.
  27.  
  28. For what you want, the Matrix which contains the FormCells must have a  
  29. text delegate, and you must use the text delegate methods (textWillEnd:,  
  30. textDidGetKeys:, etc.) to validate as they type. Even with this procedure,  
  31. the delegate methods seem to jump off at different points depending on  
  32. whether the keyboard or the mouse was used to instigate the field  
  33. movement. Bottom line, the action method is not reliable.
  34.  
  35. --
  36. Gregory H. Anderson          | "We're very tolerant around here,
  37. Benevolent Dictator-for-Life |  being only amateurs ourselves."
  38. Anderson Financial Systems   | - Tortoise (Godel, Escher, Bach)
  39. greg@afs.com  (Nextmail OK)  | 
  40.