2

I have a refresh item in my menu, bound to first responder's reload: method. I have two view controllers. Both DO implement the exact same method with the same signature:

-(void)reload:(id)sth{
    ...
}

The menu item is bound the following way:

enter image description here

In one view controller, it works perfectly. In the other one, it's grayed out. Other menu items, custom or default, work fine. It's just one method in one view controller:

enter image description here

Why can it be grayed out?

Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
  • 1
    How are you determining that the view is the first responder or in the responder chain above the first responder? If it really is in the responder chain, it could be that a) it implements `-validateMenuItem:` to return false for that item, or b) some other object closer to the first responder also implements the action method and *that* has implemented `-validateMenuItem:` to return false. – Ken Thomases May 21 '15 at 18:51
  • Also look for `validateUserInterfaceItem:`. – JWWalker May 21 '15 at 19:35
  • @KenThomases I haven't implemented that method. But after this, I've tried and it's not called. – Can Poyrazoğlu May 21 '15 at 20:54
  • Are you absolutely, positively sure that the action method in both view controller's is spelled identically and has the same case (i.e. all lowercase)? Also, what about my question about how you know it's the first responder or in the responder chain above it? – Ken Thomases May 21 '15 at 21:58

0 Answers0