• 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: Where can I put this code so that it's called when a menu is clicked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where can I put this code so that it's called when a menu is clicked


  • Subject: Re: Where can I put this code so that it's called when a menu is clicked
  • From: Clark Cox <email@hidden>
  • Date: Sat, 21 Jun 2003 21:38:00 -0400

On Saturday, Jun 21, 2003, at 21:17 US/Eastern, Cory Knapp wrote:

Where can I put this code so that it's called when a menu is clicked, but before it is displayed. Currently I'm using a timer to update the menu, but this is far from ideal. I would like to be able to load the menu as the user clicks it. Is there anywhere I can but the code to make this happen?


Make the the object that is the target of the menu item conform to the NSUserInterfaceValidations protocol, implement:

- (BOOL) validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>) anItem

this is the proper place to enable/disable the menu item.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Where can I put this code so that it's called when a menu is clicked
      • From: Dustin Voss <email@hidden>
References: 
 >Where can I put this code so that it's called when a menu is clicked (From: Cory Knapp <email@hidden>)

  • Prev by Date: Re: Where can I put this code so that it's called when a menu is clicked
  • Next by Date: Re: TrollTech releases QT for Mac under GPL
  • Previous by thread: Re: Where can I put this code so that it's called when a menu is clicked
  • Next by thread: Re: Where can I put this code so that it's called when a menu is clicked
  • Index(es):
    • Date
    • Thread