| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Secondly, there is an NSWindow delegate method that supplies an undo manager. If a text view needs an undo manager, it follows the responder chain, and will get one of these (in order):
* One returned by the NSTextView delegate's -undoManagerForTextView:
That's the one I want. The documentation tells me that "If you want a text view to have its own NSUndoManager (and not the windows), have the text views delegate implement undoManagerForTextView:, to return the NSUndoManager." What it doesn't tell me is how to implement this method. What do I return?
Well, I don't know why you don't want to use the window's and drawer's default undo manager, but given that you don't...
Just have the delegate objects instantiate an NSUndoController in the -init method, and return it.
| References: | |
| >Correct implementation of undoManagerForTextView (From: Jeremy Dronfield <email@hidden>) | |
| >Re: Correct implementation of undoManagerForTextView (From: Dustin Voss <email@hidden>) | |
| >Re: Correct implementation of undoManagerForTextView (From: Jeremy Dronfield <email@hidden>) | |
| >Re: Correct implementation of undoManagerForTextView (From: Dustin Voss <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.