< Previous PageNext Page > Hide TOC

Using the Window’s Field Editor

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.



< Previous PageNext Page > Hide TOC


© 2002, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.