Re: Forcing NSController to commit edits
Re: Forcing NSController to commit edits
- Subject: Re: Forcing NSController to commit edits
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 10 Mar 2004 12:35:43 -0800
On Mar 10, 2004, at 12:05 PM, Ali wrote:
I've got a problem where if an edit is in progress(i.e. the cursor is
in a textView or textField) and i close the window the edit is not
propagated, it is ignored(until the user pressed enter or tabs out).
So i'd like to be able to force the controller to take all pending
edits. For example, hitting a Done button on a sheet when the user has
just entered info into a text field but hasn't hit enter or tab yet,
the new data would be lost. Anyone have any ideas? Thanks,
Try sending your controller 'commitEditing'
See:
<
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Protocols/NSEditor.html>
"The NSEditor informal protocol is implemented by controllers and user
interface elements. It provides a means for requesting that the
receiver commit or discard any pending edits."
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.