You need to call this on the NSTextField's cell: setSendsActionOnEndEditing:YES
Hope it helps.
-Chaitanya

On 24-Jul-08, at 10:23 PM, Graham Cox wrote:

I have a window with a bunch of text fields. I also have an "Apply" button which takes the current settings and applies them to the data model.

If I have edited text in a field but not hit return or tab or anything else that triggers target/action, the edit is ignored. So I need a way to commit any such pending edits as part of my response to the "Apply" button. It's not clear what the right way to do that is. I know about the Field Editor, but the various methods that pertain to it seem to be rather low level. I'd sort of expect to see some sort of "validate and commit pending edits" method at the window/window controller level that takes care of figuring out which control is focused, etc. Since there doesn't appear to be one, what should I use to write one?

tia,

cheers, Graham
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to