• 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 isn't called?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: validateMenuItem isn't called?


  • Subject: Re: validateMenuItem isn't called?
  • From: Mark Dawson <email@hidden>
  • Date: Tue, 29 Mar 2005 18:16:56 -0800

The missing ":" was the problem! Thanks!

Mark
On Mar 29, 2005, at 6:06 PM, Matt Neuburg wrote:

On Tue, 29 Mar 2005 17:46:13 -0800, Mark Dawson <email@hidden> said:
I've added a new menu action (IB + code), but it isn't being called in
my validateMenuItem.  I have verified that if I select the menu item,
my action gets called (so the connection IS connected up correctly).

My code looks like:
- (BOOL)validateMenuItem:(NSMenuItem *)item {
    SEL action = [item action];
int i = 0;
if (action == @selector(editVertexAction))
i++;

One thing I can guarantee is that if your action is getting called, its name
is not editVertexAction. Its name would have to be more like
editVertexAction: (with a colon). m.



-- matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: validateMenuItem isn't called? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Creating a Cocoa Help Book
  • Next by Date: Re: Recommended Reading
  • Previous by thread: Re: validateMenuItem isn't called?
  • Next by thread: Text shadow on textured window
  • Index(es):
    • Date
    • Thread