Re: Handling UTIs from a Cocoa protocol
Re: Handling UTIs from a Cocoa protocol
- Subject: Re: Handling UTIs from a Cocoa protocol
- From: Ken Thomases <email@hidden>
- Date: Sat, 17 Dec 2011 23:18:20 -0600
On Dec 17, 2011, at 11:13 PM, Charles Srstka wrote:
> Chris already answered your main question, but I’d just like to add that it’s probably better to use UTTypeConformsTo() instead of UTTypeEqual() to test UTIs. This way, in the hypothetical case that you encounter a subtype of one of those types, things will still work, whereas with the code above, it won’t.
And, since you're already working with NSWorkspace, use -[NSWorkspace type:conformsToType:].
Cheers,
Ken
_______________________________________________
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