• 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
First Responder, NSUndoManager, and MyDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

First Responder, NSUndoManager, and MyDocument


  • Subject: First Responder, NSUndoManager, and MyDocument
  • From: Todd Heberlein <email@hidden>
  • Date: Wed, 23 Jul 2008 14:10:50 -0700

Just a intellectual curiosity question here:

I have a question about First Responder and the Document-based architecture. Why does "undo" go to the NSUndoManager and not my NSDocument subclass?

I was playing around with Hillegass's RaiseMan with Undo capabilities (Chap 9), and from looking at the call stack it appears that while the "Undo" menu is configured to go to the First Responder which I thought would be the MyDocument object, it instead it goes to MyDocument's NSUndoManager. Other menu items that I set up to go to the First Responder *do* make it to MyDocument, and even if I add my own -undo: method to MyDocument, selecting Undo in the menu will not call it.

What gives? Why doesn't an undo: message get sent to my MyDocument object?

Thanks,

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: First Responder, NSUndoManager, and MyDocument
      • From: Seth Willits <email@hidden>
  • Prev by Date: Daemon Advice?
  • Next by Date: Re: Spotlight and NSPredicate
  • Previous by thread: Re: Daemon Advice?
  • Next by thread: Re: First Responder, NSUndoManager, and MyDocument
  • Index(es):
    • Date
    • Thread