I am writing a non-NSDocument
-based application similar in style to, say, AddressBook.app. It has a single window located in MainMenu.nib
.
Currently, I am struggling with integrating NSUndoManager
with this application. If I create an instance of NSUndoManager
and store it into an instance variable of my AppController
class, the "Undo" menu item doesn't get enabled on registering undos with the manager.
What do I have to do in order to connect the NSUndoManager
instance to the menu items and have it manage the window's dirty state?