Re: Extra menu item in a bound NSPopUpButton menu
Re: Extra menu item in a bound NSPopUpButton menu
- Subject: Re: Extra menu item in a bound NSPopUpButton menu
- From: Jerry Krinock <email@hidden>
- Date: Sat, 7 Aug 2010 19:35:56 -0700
On 2010 Aug 07, at 14:39, John Ackert wrote:
> I have an NSPopUpButton bound to an NSArrayController which manages the content of the NSPopUpButton menu. Now I want some extra menu items at the end of the dynamic content separated by a separator menu item.
> What is the best way to do this?
Cocoa Bindings are great code-savers for some things, but not for menus. I would recommend that you forget about bindings, delete the array controller, and populate the menu in code. My recommendation is strengthened by the fact that you have "dynamic content" (see -menuNeedsUpdate), and also that no one has come up with a way to put a separator menu item into an array controller in the five hours since you posted your message. I suspect that if this was possible, it wouldn't be any fun.
_______________________________________________
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