• 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: Where can I write in Undo/Redo action titles?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Where can I write in Undo/Redo action titles? (From: Daryle Walker <email@hidden>)

  • Prev by Date: Re: How to debug crash in NSOperation?
  • Next by Date: Re: How to debug crash in NSOperation?
  • Previous by thread: Where can I write in Undo/Redo action titles?
  • Next by thread: New iTunes visual plugin SDK?
  • Index(es):
    • Date
    • Thread