• 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: MAC Address Detecting Menubar App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >MAC Address Detecting Menubar App (From: Jordan Chark <email@hidden>)
 >Re: MAC Address Detecting Menubar App (From: "I. Savant" <email@hidden>)
 >Re: MAC Address Detecting Menubar App (From: Jordan Chark <email@hidden>)

  • Prev by Date: Re: Core Text?
  • Next by Date: Re: Do Cocoa bindings retain their own values?
  • Previous by thread: Re: MAC Address Detecting Menubar App
  • Next by thread: Re: MAC Address Detecting Menubar App
  • Index(es):
    • Date
    • Thread