• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSPopUpButton is too smart for it's own good
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSPopUpButton is too smart for it's own good (From: Steve Bennett <email@hidden>)

  • Prev by Date: Re: PackageMaker and custom folder icons
  • Next by Date: Switching resolution and positioning the window
  • Previous by thread: Re: NSPopUpButton is too smart for it's own good
  • Next by thread: opening images q
  • Index(es):
    • Date
    • Thread