NSNumberFormatter in Interface Builder Questions

Hi All,
I’ve been playing around with using NSNumberFormatter in my interface for validating user inputs, and I’ve got a couple of questions:

One thing that I’ve noticed is that, though it validates properly when I try to leave the text field (to another text field for example), I am allowed to click on buttons. Is there some way to warn the user that the entered text is invalid when they click on buttons, and disallow the button click?

Also, I can’t seem to get the NSNumberFormatter to work with combo boxes. I’m using a list of numbers (as strings) for the content of the combo box, but when I run the program, the combo box is empty.

Ant help would be much appreciated.

You can try moving the focus in the handler called when the button is clicked. Something like this:

 on doClick_(sender)
tell sender's |window|() to set x to makeFirstResponder_(sender's |window|())
if x as boolean = false then
-- something is stopping it, probably validation of a text field

Thanks Shane. That did the trick.