Re: validateMenuItem() not always being called
Re: validateMenuItem() not always being called
- Subject: Re: validateMenuItem() not always being called
- From: "Kyle Sluder" <email@hidden>
- Date: Sun, 18 May 2008 18:51:50 -0400
On Sun, May 18, 2008 at 6:46 PM, Hal Mueller <email@hidden> wrote:
> -validateMenuItem: is deprecated; you should probably be using
> -validateUserInterfaceItem:
Not entirely true... according to the Application Menu and Pop-up List
Programming Topics for Cocoa document, under "Choosing
validateMenuItem: or validateUserInterfaceItem:"...
"In general, you should use validateUserInterfaceItem: instead of
validateMenuItem: since the former will also work for toolbar items
which have the same target and action. If, however, there is
additional work that you want to do that is specific to a menu item,
use validateMenuItem:—for example, validateMenuItem: is also a good
place to toggle titles or set state on menu items to make sure they're
always correct."
So yes, in most cases, -validateUserInterfaceItem: is more
appropriate, but some cases would benefit from using
-validateMenuItem: instead.
--Kyle Sluder
_______________________________________________
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