• 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: More on Undo and Redo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on Undo and Redo


  • Subject: Re: More on Undo and Redo
  • From: Michael Ash <email@hidden>
  • Date: Thu, 19 Feb 2009 22:29:17 -0500

On Thu, Feb 19, 2009 at 2:34 PM, Randall Meadows <email@hidden> wrote:
> The problem is Redo.  This is not a symmetric operation, like changing the
> color of an object on screen.  All I need to do to Redo is call the method
> that deletes the card.  It seems I need to tell the Undo manager to invoke a
> different method, with different arguments, when Redo is invoked, but I've
> not found how to do that.

I'm afraid I don't understand the difficulty. In your delete method,
you set up an undo operation to call your add method. When undo is
invoked, it calls your add method. In there, you set up an undo
operation to call your delete method. When redo is invoked, your
delete method is invoked, and you go back to the start. There's no
need to do anything special to tell the undo manager to do something
different, because it happens at a completely different place in your
code.

Mike
_______________________________________________

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: More on Undo and Redo
      • From: Randall Meadows <email@hidden>
References: 
 >More on Undo and Redo (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Need recommendations for best way to build a custom view
  • Next by Date: Re: performance of UIControls
  • Previous by thread: More on Undo and Redo
  • Next by thread: Re: More on Undo and Redo
  • Index(es):
    • Date
    • Thread