NSEditor

A set of methods that controllers and UI elements can implement to manage editing.

Overview

The NSEditor informal protocol provides a means for requesting that the receiver commit or discard any pending edits.

These methods are typically invoked on user interface elements by a controller. They can also be sent to a controller in response to a user’s attempt to save a document or quit an application.

NSController provides an implementation of this protocol, as do the AppKit user interface elements that support binding.

Topics

Managing Editing

- discardEditing

Causes the receiver to discard any changes, restoring the previous values.

Deprecated
- commitEditing

Returns whether the receiver was able to commit any pending edits.

Deprecated
- commitEditingAndReturnError:

Attempt to commit pending edits, returning an error in the case of failure.

Deprecated
- commitEditingWithDelegate:didCommitSelector:contextInfo:

Attempt to commit any currently edited results of the receiver.

Deprecated

See Also

Edit Management

NSEditorRegistration

A set of methods that controllers can implement to enable an editor view to inform the controller when it has uncommitted changes.