Restoring Temporary Menu Title Changes
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