Re: adding a sub menu to multiple super menus?
Re: adding a sub menu to multiple super menus?
- Subject: Re: adding a sub menu to multiple super menus?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 6 Aug 2009 11:28:56 -0700
On 2009 Aug 05, at 22:08, Graham Cox wrote:
On 06/08/2009, at 5:41 AM, David M. Cotter wrote:
in carbon, you can have a sub menu that is used in more than one
super menu.
is there a trick to get this to go in Cocoa?
As far as I know a menu has to be a distinct instance - you can't
share them. I think I tried it once and it failed miserably.
I've never tried that, but one thing that would work is to generate
the menu on the fly when it's needed. You can use the same method to
generate each submenu. For example, I have a contextual menu item
which contains two items "Copy To ->" and "Move To ->". The method
you'll want to use is -menuNeedsUpdate. The stated purpose of this
method is for lazy generation of hierarchical menus, but it should
work for David's purpose also.
_______________________________________________
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