Re: Where can I write in Undo/Redo action titles?
Re: Where can I write in Undo/Redo action titles?
- Subject: Re: Where can I write in Undo/Redo action titles?
- From: Quincey Morris <email@hidden>
- Date: Mon, 27 Mar 2017 21:58:45 -0700
On Mar 27, 2017, at 16:25 , Daryle Walker <email@hidden> wrote:
>
> The problem is that you’re traditionally supposed to put the names of actions during the action so Undo/Redo can add them to their menu label.
That’s not quite true. By default, *all* of the undo actions registered during the current iteration of the run loop are grouped into a single group, which is effectively one giant action. The last action name you set while the group is “open” (i.e. during the current iteration of the run loop) is what appears on the Undo menu item.
That’s what happens when you set up the original action. For the automatic undo/redo, I would assume that Core Data would handle resetting the name stored with the action (group), but since this is Core Data who knows what it really does.
> I do have a pair of menu actions with app-custom code, but the other actions are automatic so there’s no obvious spot to insert action strings.
What menu actions? “undo:” and “redo:”? If you implement those action methods yourself, you take on *all* responsibility for maintaining the menu items, including filling them out with action names, and internationalizing them. So implementing them yourself tends to be a bad idea, precisely because the action names will no longer appear unless you do it manually.
_______________________________________________
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