Attempt to commit any currently edited results of the receiver.
- macOS 10.5+
An object that can serve as the receiver's delegate. It should implement the method specified by
A selector that is invoked on delegate.
Contextual information that is sent as the
contextargument to delegate when
The receiver must have been registered as the editor of an object using
object, and has not yet been unregistered by a subsequent invocation of
object. When the committing has either succeeded or failed, send the
delegate the message specified by
did method must have the following method signature:.
If an error occurs while attempting to commit, for example if key-value coding validation fails, an implementation of this method should typically send the receiver’s view a
present message, specifying the view's containing window.
You may find this method useful in some situations when you want to ensure that pending changes are applied before a change in user interface state. For example, you may need to ensure that changes pending in a text field are applied before a window is closed. See also
commit which performs a similar function but which allows you to handle any errors directly, although it provides no information beyond simple success/failure.