• 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: Can't get setDelegate to work on NSMenu attached to NSStatusItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem


  • Subject: Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 4 Mar 2009 10:18:45 -0700


On Mar 4, 2009, at 9:42 AM, Mark D. Gerl wrote:

Any ideas??? I'm still stuck.


I already pointed out several problems with your code. But let me show you what worked for me:

NSMenu *statusMenu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease];

_statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength: 25.0] retain];
[_statusItem setImage:[NSImage imageNamed:...]];
[_statusItem setMenu:statusMenu];
[_statusItem setHighlightMode:YES];
[statusMenu setDelegate:self];


Then the delegate gets -menuNeedsUpdate: messages with no problems.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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


References: 
 >Can't get setDelegate to work on NSMenu attached to NSStatusItem (From: "Mark D. Gerl" <email@hidden>)
 >Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (From: Nick Zitzmann <email@hidden>)
 >Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (From: "Mark D. Gerl" <email@hidden>)
 >Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (From: "Mark D. Gerl" <email@hidden>)

  • Prev by Date: View Caching Issues and Questions
  • Next by Date: Re: SyncServices ...
  • Previous by thread: Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem
  • Next by thread: Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem
  • Index(es):
    • Date
    • Thread