• 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: forcing menu validation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forcing menu validation


  • Subject: Re: forcing menu validation
  • From: Mudi Dandan <email@hidden>
  • Date: Thu, 20 Nov 2008 03:34:32 +0100

I didn't.
I'm using automatic menu validation.
The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validation process.
Unfortunately -validateUserInterfaceItem: doesn't seem to be called when pressing a shortcut, so hitting command-w will close the window instead of the current tab. Using the mouse it would work fine.


On Nov 20, 2008, at 3:16 AM, Kyle Sluder wrote:

On Wed, Nov 19, 2008 at 9:12 PM, Mudi Dandan <email@hidden> wrote:
Is there any way to force a menu validation?

Did you miss the documentation for -autoenablesItems? The Application Menu and Pop-up List Progamming Topics for Cocoa guide describes your options:

1. Automatic menu enabling
2. Calling -setEnabled: manually.

http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles/EnablingMenuItems.html#/ /apple_ref/doc/uid/20000261

So you can't force validation through the NSMenuValidation protocol.
You can only either take the reins or go hands-off.

--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: forcing menu validation
      • From: Quincey Morris <email@hidden>
References: 
 >forcing menu validation (From: Mudi Dandan <email@hidden>)
 >Re: forcing menu validation (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Decomposing an interface into separate nibs
  • Next by Date: Re: forcing menu validation
  • Previous by thread: Re: forcing menu validation
  • Next by thread: Re: forcing menu validation
  • Index(es):
    • Date
    • Thread