On Jan 3, 2012, at 02:11 , Martin Hewitson wrote:

> Actually, it seems that the NSWorkspace method behaves differently, (assuming 
> I'm using it correctly):
> 
> [[NSWorkspace sharedWorkspace] filenameExtension:@"pdf" 
> isValidForType:(NSString *)kUTTypeText]
> 
> returns YES
> 
> whereas the UTTypeConformsTo() solution returns NO.

One thing to consider is that your UTType… approach uses the *preferred* UTI 
for '.pdf', which may indeed not conform to the text type. But there could be 
another '.pdf'-based UTI defined on your system that does conform. AFAICT the 
standard UTIs don't contain a text-conforming UTI for '.pdf', but it's 
certainly possibly that some app has added the association.


_______________________________________________

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