Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSLog headaches



I'm have a function...

-(BOOL) isApplication:(NSString*)path
{
NSString* appName;
NSString* type;
BOOL result = [[NSWorkspace sharedWorkspace] getInfoForFile:path application:&appName type:&type];

return (result && [type isEqualToString:@"app"]);
}

to determine if a file is an application. This works fine, but if the file doesn't have an appName associated with it, it writes this to the console...

May 18 15:06:59 MyApp[461] LSGetApplicationForURL() returned -10814 for file /Users/Shared/filename

Why does this routine call NSLog? How can I turn it off? I call this routine for every file I encounter and my console window gets flooded with these messages.

Any ideas?

steve




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.