• 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
nsstatusitem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nsstatusitem


  • Subject: nsstatusitem
  • From: Tavis <email@hidden>
  • Date: Thu, 20 Nov 2003 04:21:30 -0800

I can't figure out why sometimes my nsstatusbar doesnt accept
mouseclicks even though i know it is enabled

it works sometimes but othertimes it doesnt even hilite on mouseclicks
or drop down my menu
if i rapidly click on the desktop while my app launches then the
nsstausbar doesnt accept mouseclicks when the app finishes launching
i've tried everything i can think of

this code is in my appfinishedlaunching but ive put it in awakefromnib
and everwhere else with no luck

//statusbar
statusItem = [[NSStatusBar systemStatusBar]
statusItemWithLength:NSSquareStatusItemLength];
[statusItem retain]; // else the menu item just flashes on
[statusItem setHighlightMode:YES];
[statusItem setMenu:theMenu];

[statusItem setEnabled:YES];
[statusItem setTarget:self];
[statusItem setAction:@selector(menuClicked:)];
[statusItem sendActionOn:NSLeftMouseDownMask];

any ideas?

Tavis
_______________________________________________
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.

  • Follow-Ups:
    • Re: nsstatusitem
      • From: Rustam Muginov <email@hidden>
  • Prev by Date: Re: Tunneling mouse events through windows?
  • Next by Date: Report printing
  • Previous by thread: Re: Mailing list: General options
  • Next by thread: Re: nsstatusitem
  • Index(es):
    • Date
    • Thread