Re: NSTextField: Sending action to target on every keypress
Re: NSTextField: Sending action to target on every keypress
- Subject: Re: NSTextField: Sending action to target on every keypress
- From: Jim Correia <email@hidden>
- Date: Wed, 7 Feb 2007 14:37:06 -0500
On Feb 7, 2007, at 2:24 PM, Mike R. Manzano wrote:
I want a validation routine to run for every character someone
types into an NSTextField. The validation routine determines if an
Okay button gets enabled. It is not good enough for me to wait
until the text field loses focus, because that would require the
user to click into another field or hit the tab key before the Okay
button becomes clickable.
Are you using bindings, or target/action?
If the latter, you want to be the text field's delegate and react to -
controlTextDidChange:.
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/Classes/NSControl_Class/Reference/Reference.html#//
apple_ref/occ/instm/NSObject/controlTextDidChange:>
Jim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden