• 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: multiple UndoManagers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple UndoManagers


  • Subject: Re: multiple UndoManagers
  • From: Georg Seifert <email@hidden>
  • Date: Sat, 5 Jul 2008 20:37:55 +0200


My document Object has a Array of independent graphical items (containing some properties).

Each item should have its own undo/redo based of selection in the interface. So I select Item_1, modify it, select Item_2 and modify it, too. Then I want to be able to select item_1 again and undo its changes.

I know that this is very unusual and may confuse users but it needs to be this way.

I have a Instance of NSUndoManager in each of my items. But how do I tell the menu which undoManager is "active" (to display an appropriate actionName).

Implementing the window delegate method 'windowWillReturnUndoManager:' to return the correct undo manager should do what you want.

This was very helpfull. I didn’t thought that 5 lines of code could help. ;)


But than I have just another question: If I select more than one object. All the handling of the undos of the single object I can do in the undo/redo functions of my delegate. But how do I tell the menu that the is "something" to undo? I would return a dummy undoManager? How do I set this up?

For now I can live with it that undo only works with on object selected but it would be very convenient for the users to have it in the long term.

Many Thanks again
Georg_______________________________________________

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: multiple UndoManagers
      • From: Quincey Morris <email@hidden>
References: 
 >multiple UndoManagers (From: Georg Seifert <email@hidden>)
 >Re: multiple UndoManagers (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: auxiliary window doesn't show again after first show
  • Next by Date: Toolbar code in separate Controller?
  • Previous by thread: Re: multiple UndoManagers
  • Next by thread: Re: multiple UndoManagers
  • Index(es):
    • Date
    • Thread