Contents

fieldEditor(for:)

Returns a custom field editor for editing in the view.

Declaration

func fieldEditor(for controlView: NSView) -> NSTextView?

Parameters

  • controlView:

    The view containing cells that require a custom field editor.

Return Value

A custom field editor. The field editor must have isFieldEditor set to true.

Discussion

This is an override point for NSCell subclasses designed to use their own custom field editors. This message is sent to the selected cell of aControlView using the NSWindow method in fieldEditor(_:for:).

Returning non-nil from this method indicates skipping the standard field editor querying processes including windowWillReturnFieldEditor(_:to:) delegation.

The default implementation returns nil.

See Also

Editing and Selecting Text