• 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: systemStatusBar notification for mouse click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: systemStatusBar notification for mouse click


  • Subject: Re: systemStatusBar notification for mouse click
  • From: Vance <email@hidden>
  • Date: Thu, 31 Jan 2008 22:52:35 -0800

Never mind, I found it could be done by creating a custom view and setting it ([statusItem setView: myView])

Vance wrote:
Hello,

Is there a way to be notified when someone clicks on my systemStatusBar Item OR when the pop up menu becomes visible?

This is how the system status bar is created:

   {
       ...
       statusBar = [[NSStatusBar systemStatusBar] retain];
       statusItem = [[statusBar statusItemWithLength:50] retain]

       [statusItem setLength: NSVariableStatusItemLength];
       [statusItem setHighlightMode:YES];
             [statusItem setMenu:theDockMenu];
       [statusItem setImage: img ];
       [statusItem setEnabled:YES];

       [statusItem setLength:NSVariableStatusItemLength];

I tried calling:

       [statusItem setTarget:self];
       [statusItem setAction:@selector(onStatusMenu:)];
   }

   - (void)onStatusMenu:(id)none
   {
       NSLog(@"onStatusMenu");
   }

However the action is never called and after investigating online it looks like setTarget/setAction dont work for image status items.

Thank you,
-Vance
_______________________________________________

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

_______________________________________________

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: 
 >How to use IKFilterUIViews to manipulate the filters array when applied to CALayer? (From: Ivan Scott <email@hidden>)
 >systemStatusBar notification for mouse click (From: Vance <email@hidden>)

  • Prev by Date: Re: IKImageBrowserView enumerate items in clipView?
  • Next by Date: IKImageBrowserView - redraw a cell with update data
  • Previous by thread: systemStatusBar notification for mouse click
  • Next by thread: IKImageBrowserView enumerate items in clipView?
  • Index(es):
    • Date
    • Thread