Re: NSPopUpButton is too smart for it's own good
Re: NSPopUpButton is too smart for it's own good
- Subject: Re: NSPopUpButton is too smart for it's own good
- From: "Timothy J. Wood" <email@hidden>
- Date: Tue, 12 Feb 2002 11:47:09 -0800
On Thursday, February 7, 2002, at 09:37 AM, Steve Bennett wrote:
[...]
Unfortunately, the NSPopUpButton control assumes that if you add an item
into the menu with the same name as another item in the menu, you're
actually replacing that item. We've hacked around this for now by
adding
stuff to the end of duplicate names, but that causes it's own issues.
[...]
I don't recall seeing anyone provide an answer to this...
You should be able to avoid this behavior of NSPopUpButton by doing
the following:
- Create NSMenuItem instances yourself rather than asking the popup to
do it
- Add them to the NSMenu held by the popup:
[[popUp menu] addItem: item];
-tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.