objective-ccocoamacosinterface-buildernsmenuitem

menu item is enabled, but still grayed out


I have a menu with several items created in interface builder. It looks fine there and 'enabled' is checked. But when I run the application, all menu items are grayed out.

I've checked isEnabled, it returns true.

Also, menu items created programmatically (with initWithTitle and without interface builder) work just fine.

Am I missing something here? I'm really quite new to OS X development.


Solution

  • In case somebody might google this out and benefit, 'Action' method was declared without :(id)sender parameter:

    -(IBAction) quit;
    

    Strangely, setAction method in NSMenuItem ate it and didn't complain. Oh well.