On Nov 28, 2008, at 9:59 PM, Pierce Freeman wrote:
Would there be some way using the NSSet method to output a list of the
applications that the user needs to close in order for the current
applications to be "in the good list"?
You can use the NSMutableSet method minusSet:
NSSet *allowedSet = [NSSet setWithObjects:@"one",@"two",@"three",nil];
NSMutableSet *openSet = [NSMutableSet
setWithObjects:@"one",@"four",@"five",nil];
if([openSet isSubsetOfSet:allowedSet])
NSLog(@"The user has only the okay applications open");
else
{
NSLog(@"The user has these not okay applications open:");
[openSet minusSet:allowedSet];
for(id anItem in openSet)
NSLog(anItem);
}
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]