• 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
Re: NSUndoManager across multiple nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Retrieving offline messages from the mail server
  • Next by Date: finding substring
  • Previous by thread: Re: NSUndoManager across multiple nibs
  • Next by thread: NSUserDefaults persistent domains
  • Index(es):
    • Date
    • Thread