• 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: Quincey Morris <email@hidden>
  • Date: Sat, 5 Jul 2008 12:29:24 -0700


On Jul 5, 2008, at 11:37, Georg Seifert wrote:

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.

But the real question is, if you have multiple objects selected, which is the desired effect of Undo? Undo the last operation in each selected object? Undo the most recent operation done in any of the selected objects? How will the user know what the effect of choosing Undo will be? Without knowing the context of the problem, it sort of sounds like a terrible idea. :)


If you must do something complicated, I suppose you could create an additional undo manager (the "multiple selection" undo manager). Each time a multiple selection is made, load this undo manager up with a series of special undo actions that represent whatever behavior you want to undoing to have, and return it via "windowWillReturnUndoManager:". These special undo actions would be implemented as a series of invocations of undos to the individual undo managers, presumably.

Or something like that.

Keep in mind that getting redo to work right in all cases might be hard or impossible. NSWindow does something along this line, using 2 undo managers, when you type into a text field in a document window whose document has its own undo manager. But NSWindow actually gets redo wrong in this situation.


_______________________________________________

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


References: 
 >multiple UndoManagers (From: Georg Seifert <email@hidden>)
 >Re: multiple UndoManagers (From: Quincey Morris <email@hidden>)
 >Re: multiple UndoManagers (From: Georg Seifert <email@hidden>)

  • Prev by Date: Re: IBTool and .XIB files
  • Next by Date: Re: auxiliary window doesn't show again after first show [solved]
  • Previous by thread: Re: multiple UndoManagers
  • Next by thread: Re: multiple UndoManagers
  • Index(es):
    • Date
    • Thread