On Nov 20, 2009, at 21:15, Kyle Sluder wrote:

> On Nov 20, 2009, at 6:38 PM, "Sean McBride" <cwat...@cam.org> wrote:
> 
>> Quincey Morris (quinceymor...@earthlink.net) on 2009-11-20 6:34 PM said:
>> 
>>> ...the window controller could send
>>> 'commitEditing:' messages directly to text fields and other views that
>>> implement the NSEditor protocol.
>> 
>> Nope.  Despite the docs, you can't send commitEditing to a textfield.
> 
> It might be worth trying -commitEditingWithDelegate:…. Barring that, try 
> disassembling -[NSController commitEditing] to see what the heck it does. 
> Perhaps like a lot of other things it behaves specially when the text system 
> is involved.

When I wrote that about text fields, it was a bit of hand-waving, because I've 
never actually done it -- I've always used a mediating NSObjectController, via 
which text field commits work fine.

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.


_______________________________________________

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 arch...@mail-archive.com

Reply via email to