Re: stopping someone from tabbing past a certain text field

Uli Kusterer <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On 04.02.2010, at 18:22, Chad Leigh -- ObjectWerks Inc wrote:
>> For the user it's typically *very* frustrating to be prevented from leaving fields blank - I'd advise against doing that.
> 
> Well, on a product registration page where 2 of the fields must be filled out, I'd rather they knew it before they hit the submit button and are told.

 Several options:

1) Do like on a web page and put an asterisk next to the required fields

2) Override controlTextDidChange: or the similar NSText/NSTextView methods (you may have to supply your own field editor), or use bindings and override the setter to also do validation, and then display a warning icon next to fields that aren't valid yet. That's how Apple does it in the setup assistant that comes up when you start a new Mac.

3) Same as #2, but disable the OK button until all required fields are filled out. I don't really recommend this. Some people may not understand the icons ((color) blindness, cultural differences, bad icon design, tiredness...), so having the option to click "OK" and be presented with a textual error message saying sth. like "<label of first invalid field> needs to be filled out" can save you a bunch of support calls.

-- Uli Kusterer
Sole Janitor
http://www.the-void-software.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.