On Jan 3, 2012, at 10:29 , Martin Hewitson wrote:

> I don't know how to check that. In any case, I'm left wondering which one to 
> use. I want that .pdf is not a text file, so I guess I'll stick with the 
> UTTypeConformsTo() solution, though this all feels a little fragile. I may 
> make hard-coded exceptions for typical extensions that the app deals with, 
> and always return YES from my -isText method for these particular extensions.

Incidentally, this:

        [[NSWorkspace sharedWorkspace] filenameExtension:@"pdf" 
isValidForType:(NSString *)kUTTypeText]

returns NO for me. You could try investigating 
'UTTypeCreateAllIdentifiersForTag' to find all of the '.pdf'-associated UTIs on 
your Mac. That might give a clue. You could also investigate the Finder's "Open 
With…" menu (for some '.pdf' file), to see what applications have registered 
themselves as accepting PDF. Perhaps one of them registered a non-standard UTI.


_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to