Re: Giving names to undo actions
Re: Giving names to undo actions
- Subject: Re: Giving names to undo actions
- From: Quincey Morris <email@hidden>
- Date: Wed, 21 Dec 2016 00:44:15 -0800
- Feedback-id: 167118m:167118agrif8a:167118syzgFPFZ9g:SMTPCORP
On Dec 21, 2016, at 00:06 , John Brownie <email@hidden> wrote:
>
> Undoing it is a remove, which sets the name "remove".
No, there are three steps: create, undo, redo. You only set the name on the create step. So, after you do the add, the menu reads “Undo Add”. After you undo the add, the menu reads “Redo Add”. After you redo the add, the menu reads “Undo Add” again.
(IIRC, if you code is structured in such a way that you want to handle multiple steps in one place, you can test the “isUndoing” and “isRedoing” properties to decide whether to set the name.)
_______________________________________________
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