On 26/02/2011, at 4:31 PM, koko wrote: > I connect a menu item to an action in first responder. The action is defined > in a .h and .m in the project > > In applicationDidFinishLaunching I alloc, init and retain an object that > contains the action connected to the menu item in first responder. > > At run time the menu item is not enabled. I don't get it.
If the object isn't in the responder chain, it can't respond. If it's not a subclass of NSResponder, it can't be in the responder chain. The application delegate itself is in the responder chain (on behalf of NSApplication), so this is where the action should be implemented (even if it just passes it on to the helper object). If something in the responder chain can respond to the action, the menu item will be automatically enabled. --Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com