FROM : Mr. Gecko
DATE : Sat May 24 17:29:03 2008
Thanks I am using this
iTunesIsOpen = NO;
[iTunesLMenu setTitle: NSLocalizedString(@"Launch iTunes",@"")];
NSArray *lApplications = [[NSWorkspace sharedWorkspace]
launchedApplications];
int a;
for (a=0; a<[lApplications count]; a++) {
NSDictionary *applicationD = [lApplications objectAtIndex:a];
if ([[applicationD objectForKey:@"NSApplicationName"]
isEqualToString:@"iTunes"]) {
iTunesIsOpen = YES;
[iTunesLMenu setTitle: NSLocalizedString(@"Quit iTunes",@"")];
}
}
On May 23, 2008, at 5:07 PM, Nick Zitzmann wrote:
>
> On May 23, 2008, at 4:01 PM, Mr. Gecko wrote:
>
>> How can I tell if iTunes is running with cocoa.
>
>
> In this particular case, you should be able to get that information
> using -[NSWorkspace launchedApplications]...
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
DATE : Sat May 24 17:29:03 2008
Thanks I am using this
iTunesIsOpen = NO;
[iTunesLMenu setTitle: NSLocalizedString(@"Launch iTunes",@"")];
NSArray *lApplications = [[NSWorkspace sharedWorkspace]
launchedApplications];
int a;
for (a=0; a<[lApplications count]; a++) {
NSDictionary *applicationD = [lApplications objectAtIndex:a];
if ([[applicationD objectForKey:@"NSApplicationName"]
isEqualToString:@"iTunes"]) {
iTunesIsOpen = YES;
[iTunesLMenu setTitle: NSLocalizedString(@"Quit iTunes",@"")];
}
}
On May 23, 2008, at 5:07 PM, Nick Zitzmann wrote:
>
> On May 23, 2008, at 4:01 PM, Mr. Gecko wrote:
>
>> How can I tell if iTunes is running with cocoa.
>
>
> In this particular case, you should be able to get that information
> using -[NSWorkspace launchedApplications]...
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
| Related mails | Author | Date |
|---|---|---|
| Mr. Gecko | May 24, 00:01 | |
| Nick Zitzmann | May 24, 00:07 | |
| Mr. Gecko | May 24, 17:29 | |
| Steve Christensen | May 24, 21:05 | |
| Thomas Engelmeier | May 24, 22:22 | |
| Jens Alfke | May 24, 23:11 | |
| Steve Christensen | May 24, 23:13 | |
| Steve Christensen | May 24, 23:18 | |
| Mr. Gecko | May 25, 00:31 | |
| has | May 25, 00:40 |






Cocoa mail archive

