Skip navigation.
 
mlNSTextField value binding and button click
FROM : Lieven Dekeyser
DATE : Mon Jan 28 22:11:55 2008

Hi all,

In my app, I have a basic login form: username field, password field
and login button. The username and password fields' values are bound
to a custom controller that saves the values after editing. When the
login button is clicked, the username and password are fetched from
the custom controller.

This setup works well for  those of us that enter the information by
keyboard, i.e. <type name> <enter> <type password> <enter>, but it
doesn't work when the user clicks the login button while the focus is
still on the password field, in which case the button's action is
called before the password field's value is submitted to the
controller.

I could  set the binding to update continuously, but that causes the
custom controller to store the values after every keystroke.

Is there any way to make sure the password field's editor ends when
the user clicks on a button?

Thanks,

Lieven Dekeyser

Related mailsAuthorDate
mlNSTextField value binding and button click Lieven Dekeyser Jan 28, 22:11
mlRe: NSTextField value binding and button click Kyle Sluder Jan 28, 22:45
mlRe: NSTextField value binding and button click Quincey Morris Jan 28, 23:35
mlRe: NSTextField value binding and button click Lieven Dekeyser Jan 29, 11:56
mlRe: NSTextField value binding and button click Kyle Sluder Jan 29, 19:36
mlRe: NSTextField value binding and button click Quincey Morris Jan 29, 19:39
mlRe: NSTextField value binding and button click Lieven Dekeyser Jan 30, 16:09