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.
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 mails | Author | Date |
|---|---|---|
| Jordan Chark | Nov 19, 22:10 | |
| I. Savant | Nov 19, 22:26 | |
| Jordan Chark | Nov 19, 22:46 | |
| David Symonds | Nov 19, 22:55 | |
| I. Savant | Nov 19, 22:58 | |
| Shawn Erickson | Nov 19, 23:00 | |
| j o a r | Nov 19, 23:10 |






Cocoa mail archive

