• 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: validateMenuItem() not always being called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: validateMenuItem() not always being called
      • From: email@hidden
References: 
 >validateMenuItem() not always being called (From: email@hidden)
 >Re: validateMenuItem() not always being called (From: Hal Mueller <email@hidden>)

  • Prev by Date: Re: NSTreeController problems
  • Next by Date: Re: validateMenuItem() not always being called
  • Previous by thread: Re: validateMenuItem() not always being called
  • Next by thread: Re: validateMenuItem() not always being called
  • Index(es):
    • Date
    • Thread