Re: The same view used in 2 menu items
Re: The same view used in 2 menu items
- Subject: Re: The same view used in 2 menu items
- From: Seth Willits <email@hidden>
- Date: Fri, 24 May 2013 11:40:34 -0700
On May 24, 2013, at 11:28 AM, Steve Mills wrote:
> I have an NSOutlineView in a window. One of the columns uses an NSPopUpButtonCell (a subclass actually). The menu contains 1 menu item, which shows an NSView. This window also has an NSPopUpButton whose menu contains 1 menu item, which also shows an NSView. When I try using the same NSView in both places, they don't show up. Is there some trick to sharing the same view among 2 menu items? Or can I use the same menu in both places? I'm out of my Cocoa comfort zone here, code-wise and Interface Builder-wise.
Although two menus won't be visible at the same time, you don't control when the view is placed into the menu's view and apparently Cocoa can't sort it out on its own. Using the same menu for both popups will work. Just set the same menu for both — I think IB won't let you so you'll have to use code. Otherwise, just make two menus.
--
Seth Willits
_______________________________________________
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