• 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
NSPopupButton menu not showing in custom view for NSMenuItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopupButton menu not showing in custom view for NSMenuItem


  • Subject: NSPopupButton menu not showing in custom view for NSMenuItem
  • From: Daniel Meachum <email@hidden>
  • Date: Fri, 08 Jan 2010 00:16:18 +0900

I'm trying to use an NSPopupButton inside of a view nested in an NSMenuItem (development for OS X 10.6 only). The menu is created but it refuses to popup/out of the button. No Console messages are displayed or UI feedback. I originally found the problem while programmatically creating the view but also reproduced it in IB with the following steps:

1.)  In app delegate, create an NSStatusItem and IBOutlet NSMenu.
2.) Set the Status Item's menu and init properties on awakeFromNib or where-ever.

	statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];
	[statusItem setHighlightMode:YES];
	[statusItem setTitle:@"Hello =)"];
	[statusItem setMenu:statusMenu];

3.) In Interface Builder, drop in a new menu onto the xib and connect the app delegate outlet to it
4.) Remove items 2 and 3 from the menu
5.) Drop in a new custom view.
6.) Drop in a NSPopupButton onto the custom view (leave the items 1,2 and 3 in its menu)
7.) Set the 'view' outlet of item 1 in the NSMenu to the custom view
8.) Run and try to press the button

I've search online as best I could although I could be missing some documentation. Does anyone know if this is a limitation to NSMenuItem views or if there is a workaround? Thanks!
_______________________________________________

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

  • Follow-Ups:
    • Re: NSPopupButton menu not showing in custom view for NSMenuItem
      • From: Eric Schlegel <email@hidden>
  • Prev by Date: Re: help system structure
  • Next by Date: Re: Julian date
  • Previous by thread: Subject: Re: NSEvent timestamp is zero
  • Next by thread: Re: NSPopupButton menu not showing in custom view for NSMenuItem
  • Index(es):
    • Date
    • Thread