Using NSWorkspace's launchedApplication to detect running App
Using NSWorkspace's launchedApplication to detect running App
- Subject: Using NSWorkspace's launchedApplication to detect running App
- From: John Love <email@hidden>
- Date: Sat, 13 Dec 2008 12:14:08 -0500
I do not understand why this code completes with the specified
application not being active .. when it really is? I really need your
help.
BOOL AppActive = NO;
NSWorkspace *workSpace;
NSArray *runningAppDictionaries;
NSDictionary *aDictionary;
workSpace = [NSWorkspace sharedWorkspace];
runningAppDictionaries = [workSpace launchedApplications];
for (aDictionary in runningAppDictionaries) {
if ([aDictionary valueForKey:@"NSApplicationName"] == @"My
Application") {
AppActive = YES;
break;
}
}
return AppActive;
Thanks ...
John Love
Touch the Future! Teach!
_______________________________________________
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