Here's my approach and most of my code (since it has to be "under 25
kb"):
- (void)menuWillOpen:(NSMenu *)menu
{
if([iTunes isRunning])
{
if([[[iTunes currentTrack] artist] isEqualToString:@""])
{
[one setTitle:@"Artist: N/
Also, how can I set it so that instead of text it is a 16x16 image?
Sorry, missed this one. How about -setImage:? According to the
docs, it "Sets the image that is displayed at the receiver’s position
in the status bar to image."
--
I.S.
___
I use barItem extensively. But after "Quitting iTunes" and leaving
it be for a while, I clicked it and it did go to the other menu. But
it wasn't instantaneous and it seems to be stalling after a while.
Also, how can I set it so that instead of text it is a 16x16 image?
...
I think I figured
Hey,
I think I figured out why my change isn't instantaneous like I was
complaining before. I have a subclassed menuWillOpen: which updates my
data upon open. Maybe I need to rework my code. Is there any if
statement that could get me around this code problem?
Thanks,
Jeremy
"For a long t
I.S.,
I use barItem extensively. But after "Quitting iTunes" and leaving it
be for a while, I clicked it and it did go to the other menu. But it
wasn't instantaneous and it seems to be stalling after a while. Also,
how can I set it so that instead of text it is a 16x16 image?
Jeremy
"For
> - (void)quitItunes:(id)sender
> {
> [[NSNotificationCenter defaultCenter] removeObserver:self];
> [iTunes quit];
> iTunesQuit = [[NSMenu alloc] initWithTitle:@""];
> qOne = [iTunesQuit addItemWithTitle:@"Start Watching iTunes Again"
> action:@selector(beginWatch
August,
If you would like to send me your code that would be helpful. But I do
my menu bar programatically due to the actual nature of my status bar...
I.S.,
Here's my code to quit iTunes. barItem is the NSStatusItem, iTunes is
the Scripting Bridge iTunes Framework, and iTunesQuit is the n
I just threw together a quick sample project, and I didn't have any
trouble switching menus.
Simply put:
I've got 2 menus, fooMenu and barMenu, both in IB. I have from my
controller outlets connected to both. In the controller,
[statusItem setMenu:fooMenu];
and
[statusItem setMenu:barMen
> Surprisingly, yes. I referred to the documentation BEFORE asking here.
Clearly you're new here ... ;-)
> That was the only method that seemed like it would work, but it
> doesn't. So, hopefully this can be done. I also tried changing the
> title to the one action I want and setting the ac
I.S.,
Surprisingly, yes. I referred to the documentation BEFORE asking here.
That was the only method that seemed like it would work, but it
doesn't. So, hopefully this can be done. I also tried changing the
title to the one action I want and setting the action but that didn't
work. So I'
> How can I switch menus for an NSStatusItem programatically? So if the
> user chooses to "quit" the application from the NSStatusItem I can
> switch it's menu to be another menu with launch options.
I admit I've never created a status item before, but have you tried
the -setMenu: method refe
Hello,
How can I switch menus for an NSStatusItem programatically? So if the
user chooses to "quit" the application from the NSStatusItem I can
switch it's menu to be another menu with launch options.
Thanks,
Jeremy
"For a long time it puzzled me how something so expensive, so leading
ed
12 matches
Mail list logo