On Sat, Nov 21, 2009 at 12:07 PM, Quincey Morris
<[email protected]> 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 protected])
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]