Skip navigation.
 
mlRe: MAC Address Detecting Menubar App
FROM : David Symonds
DATE : Mon Nov 19 22:55:29 2007

On Nov 20, 2007 8:46 AM, Jordan Chark <jordan.<email_removed>> 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.

Related mailsAuthorDate
mlMAC Address Detecting Menubar App Jordan Chark Nov 19, 22:10
mlRe: MAC Address Detecting Menubar App I. Savant Nov 19, 22:26
mlRe: MAC Address Detecting Menubar App Jordan Chark Nov 19, 22:46
mlRe: MAC Address Detecting Menubar App David Symonds Nov 19, 22:55
mlRe: MAC Address Detecting Menubar App I. Savant Nov 19, 22:58
mlRe: MAC Address Detecting Menubar App Shawn Erickson Nov 19, 23:00
mlRe: MAC Address Detecting Menubar App j o a r Nov 19, 23:10