Re: validateMenuItem() not always being called
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