First Responder, NSUndoManager, and MyDocument
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