• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"How do I get undo/redo for free in my non-document-architecture-based app?"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"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


  • Follow-Ups:
    • Re: "How do I get undo/redo for free in my non-document-architecture-based app?"
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Using WebKit to display data that's not in HTML
  • Next by Date: wrapping
  • Previous by thread: Arabic Xcode translation [for the record]
  • Next by thread: Re: "How do I get undo/redo for free in my non-document-architecture-based app?"
  • Index(es):
    • Date
    • Thread