Re: NSUndoManager across multiple nibs
Re: NSUndoManager across multiple nibs
- Subject: Re: NSUndoManager across multiple nibs
- From: Erik Buck <email@hidden>
- Date: Fri, 31 Mar 2006 20:21:36 -0500
Does anyone have some more advanced sample code than what I posted
that might show how people usually accomplish this?
I use the responder chain. The palette always reflects the selected
objects found using the standard (target/action) responder chain:
first responder in the key window->next responder->..->key window-
>key window's delegate
first responder in the main window->next responder->..->main window-
>main window's delegate
NSApp->application's delegate
Here is the rationale:
Modifications are made to the current selection via the editor
document itself or the the palette or an inspector, or any other kind
of window/tool. As long as the definition of "current selection" is
based on properties of objects that can be found via the responder
chain then modifications to the current selection can be made by
sending an action up the responder chain.
Whatever object responds to the action provides the undo manager.
The undo manager will always be the appropriate one for the current
selection by definition :)
However, having said all that, what you tried already should work
fine. Something is wrong with your implementation.
_______________________________________________
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