• 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: email@hidden
  • Date: Mon, 19 May 2008 20:08:00 -0400

Hi

Any object's validateMenuItem method is only called for menu items
that
would message that object if they were invoked. That means: 
* Menu items whose target directly points to that object 
* Menu items whose target is "first responder", and your object is on
the responder chain and implements the item's action method. 
 
Maybe you should tell us which command(s) aren't being validated that
you think should be? 
I'm trying to validate the Edit menu. I added a custom view to the window in
IB as shown in chapter 7 of Learning Cocoa With Objective-C, 2nd Edition O'Reilly
and made it the first responder. To the view initialization method I added this:


[[self window] makeFirstResponder:self];

I'm returning YES to acceptsFirstResponder and becomeFirstResponder.
So I would think I would get validateMenuItem messages for the view
but its not being called.


Re-read the documentation about the responder chain
I read the chapters on Automatic Menu Enablingand The Responder Chain.
Not sure what I'm missing.

thanks
Jeff

_______________________________________________

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: Michael Babin <email@hidden>
References: 
 >Re: validateMenuItem() not always being called (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Re: Bindings: Allows Editing Multiple Values Selection
  • Next by Date: Re: Cocoa et al as HCI usability problem
  • Previous by thread: Re: validateMenuItem() not always being called
  • Next by thread: Re: validateMenuItem() not always being called
  • Index(es):
    • Date
    • Thread