Fwd: Chaging NSStatusItem menus.

2008-02-26 Thread Jeremy
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/

Re: Chaging NSStatusItem menus.

2008-02-25 Thread I. Savant
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. ___

Re: Chaging NSStatusItem menus.

2008-02-25 Thread I. Savant
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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread I. Savant
> - (void)quitItunes:(id)sender > { > [[NSNotificationCenter defaultCenter] removeObserver:self]; > [iTunes quit]; > iTunesQuit = [[NSMenu alloc] initWithTitle:@""]; > qOne = [iTunesQuit addItemWithTitle:@"Start Watching iTunes Again" > action:@selector(beginWatch

Re: Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread August Trometer
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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread I. Savant
> 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

Re: Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
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'

Re: Chaging NSStatusItem menus.

2008-02-25 Thread I. Savant
> 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

Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
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