Each window has a text object that is shared for light editing tasks. This object, the window’s field editor, is inserted in the view hierarchy when an object needs to edit some text and removed when the object is finished. The field editor is used by NSTextField
objects and other controls, for example, to edit the text that they display. The fieldEditor:forObject:
method returns a window’s field editor, after asking the delegate for a substitute using windowWillReturnFieldEditor:toObject:
. You can override the NSWindow fieldEditor:forObject:
method in subclasses or provide a delegate to substitute a class of text object different from the NSTextView
default, thereby customizing text editing in your application.
© 2002, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)