Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed
Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed
- Subject: Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed
- From: Kyle Sluder <email@hidden>
- Date: Sat, 21 Nov 2009 13:06:56 -0800
On Sat, Nov 21, 2009 at 12:07 PM, Quincey Morris
<email@hidden> wrote:
> It occurs to me that perhaps the reason sending 'commitEditing:' to a text field doesn't work is that you need to send it to the field editor, not the text field itself? Or something like that.
That makes sense. Strictly speaking, you need to send it to whatever
registered using -objectDidBeginEditing:. Since none of AppKit
classes other than the controllers actually declare conformance to
NSEditor, this could theoretically be anything. Like a private
category on NSTextView. I'm too lazy to actually run class-dump on
NSText{,View,Field,FieldCell} to see what it could be.
I guess the moral is "don't take shortcuts." If you want to commit
editing, send -commitEditing: to your controller. That in turn should
just send it off to its registered editors, without concern for the
type of editor it is.
--Kyle Sluder
_______________________________________________
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