Re: Correct way to commit pending text field edits?
Re: Correct way to commit pending text field edits?
- Subject: Re: Correct way to commit pending text field edits?
- From: Joel Norvell <email@hidden>
- Date: Thu, 24 Jul 2008 21:52:37 -0700 (PDT)
chaitanya pandit wrote:
> You need to call this on the NSTextField's cell:
> setSendsActionOnEndEditing:YES
sendsActionOnEndEditing appears to be ON by default. And it doesn't affect pending edits anyway. The problem is how to cause textDidEndEditing to "fire."
Hence my suggestion to "makeFirstResponder nil" for the window containing the text field.
Although Ken Ferry's suggestion
> send one of the -commitEditing... messages
> to the NSController-derived mediating controllers.
> This is part of the NSEditor information protocol.
seems more elegant than my suggestion to just "slam" the window's firstResponder.
Sincerely,
Joel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden