Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
- Subject: Re: Rebuilding menus (menuNeedsUpdate:) and System Preferences keyboard shortcuts.
- From: Peter Ammon <email@hidden>
- Date: Tue, 2 Dec 2008 11:04:39 -0800
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 (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