"How do I get undo/redo for free in my non-document-architecture-based app?"
"How do I get undo/redo for free in my non-document-architecture-based app?"
- Subject: "How do I get undo/redo for free in my non-document-architecture-based app?"
- From: "Arthur C." <email@hidden>
- Date: Mon, 18 Sep 2006 19:17:11 +0200
In the Core Data FAQ (Core Data Programming Guide 2006-09-05 page 143) there
is an item called
"How do I get undo/redo for free in my non-document-architecture-based app?"
It says I can get the undo manager from the managed-object context: "If your
window delegate has an accessor method for the managed object context (as is
the case if you use the Core Data Application template), your implementation
of windowWillReturnUndoManager: might be as follows.
-(NSUndoManager *) windowWillReturnUndoManager:(NSWindow *) sender
{
return [[self managedObjectContext] undoManager];
} "
The question is, where do I have to put this code? Where can I find the
'window delegate'? Is it the 'projectname_Appdelegate.m' file?
And, isn't it true that the managed object context can be retrieved anywhere
using something like
NSManagedObjectContext * managedObjectContext = [[NSApp delegate]
managedObjectContext];
Thanks for your time,
Arthur C.
_________________________________________________________________
Play online games with your friends with Messenger
http://www.join.msn.com/messenger/overview
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden