Many thanks! Having a separate delegate for the large document-listing menus sounds a reasonable solution. That will just be one extra delegate in the MainMenu.nib to handle this and it should fix all my issues - so thank you! One final question, I promise: does this apply to contextual menus, too, or only the main menu? Thanks again and all the best, Keith
--- On Tue, 12/2/08, Peter Ammon <[EMAIL PROTECTED]> wrote: > From: Peter Ammon <[EMAIL PROTECTED]> > Subject: Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences > keyboard shortcuts. > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com > Date: Tuesday, December 2, 2008, 7:04 PM > On Dec 2, 2008, at 8:47 AM, Keith Blount wrote: > > > The trouble is - unless I'm doing something wrong, > which is likely - that -menuHasKeyEquivalent... doesn't > seem to work like this; it seems to be an all or nothing > deal. I can return NO, in which case none of the menus get > populated. But if I return YES, the application crashes - it > seems that I have to fill in the pointers passed into the > method. But what I really want to do is return > "NO" for the larger menus that will have no key > equivalents, but for the other menus have it act as though > the delegate method isn't implemented - which > "YES" doesn't seem to do. Is there a way to do > this without having a different delegate for the menus that > get populated with the project contents (i.e. implementing > -menuHasKeyEquivalent... to return NO for the delegate of > those menus and not implementing it for the delegate of the > other menus)? Having a separate delegate object just to > perform this one task seems a bit of an awkward workaround, > which is why I think I > > must be using -menuHasKeyEquivalent... incorrectly. > > > No, there's no way to have a delegate act as if it > implements the menuHasKeyEquivalent: for one menu and not > for another. Using separate delegates is the right > approach. > > -Peter _______________________________________________ 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 [EMAIL PROTECTED]