Re: MAC Address Detecting Menubar App
Re: MAC Address Detecting Menubar App
- Subject: Re: MAC Address Detecting Menubar App
- From: "David Symonds" <email@hidden>
- Date: Tue, 20 Nov 2007 08:55:29 +1100
On Nov 20, 2007 8:46 AM, Jordan Chark <email@hidden> wrote:
> Thanks for the lengthy answer. :)
>
> To answer your first question, I'm sorta asking how to create an extra
> menu/status item which will change icons based on the presence of a
> computer detecting using Bonjour.
For setting the menu bar, stick this somewhere in your app's controller:
sbItem = [[NSStatusBar systemStatusBar]
statusItemWithLength:NSVariableStatusItemLength];
[sbItem retain];
[sbItem setHighlightMode:YES];
[sbItem setImage:sbImage];
[sbItem setMenu:sbMenu];
You'll probably want some kind of menu coming out of your status bar
icon, which is what sbMenu is meant to be an outlet for. You can call
-setImage: at any time, which will make your icon change.
Dave.
_______________________________________________
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