• 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
Restoring Temporary Menu Title Changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restoring Temporary Menu Title Changes


  • Subject: Restoring Temporary Menu Title Changes
  • From: Daniel Jalkut <email@hidden>
  • Date: Fri, 16 Feb 2007 12:05:35 -0500


A custom view implements validation methods to override the default names of some standard menu items, for instance the "Edit Items" paste, copy, etc.


When should the menu item titles be set back? I came upon this clever hack in the archives:

http://www.cocoabuilder.com/archive/message/cocoa/2000/12/17/30329

Which essentially causes the menu item titles to be set only for the life of the autorelease pool associated with the menu tracking mode. While clever, this feels a little unstable to me.

I've resigned (heh heh) to having the custom view remember the old titles of menus it alters, and set them back at some later time. In my case this should happen whenever the view resigns first responder, or whenever the window resigns key.

Anybody have any better advice for handling this kind of situation, aside from explicitly hooking into these delegation points and setting things back "the way they were"?

Daniel
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Restoring Temporary Menu Title Changes
      • From: Jim Correia <email@hidden>
  • Prev by Date: NSView -nextKeyView and -previousKeyView only working once
  • Next by Date: Re: Restoring Temporary Menu Title Changes
  • Previous by thread: Re: NSView -nextKeyView and -previousKeyView only working once
  • Next by thread: Re: Restoring Temporary Menu Title Changes
  • Index(es):
    • Date
    • Thread