A handy UTI tip

2006-07-31 23:25:00 -08:00

I found this by accident, when I wrote this code while tired:

UTTypeConformsTo(type, CFSTR(“kUTTypeText”))

That’s wrong. It should be either kUTTypeText or CFSTR("public.text"). But it works anyway.

The real question is whether CFSTR("kUTTypeText") works in Panther (the global constant kUTTypeText was introduced in Tiger). In any case, I’ll just use CFSTR("public.text") and keep Panther compatibility.

Technorati tags: Uniform type identifiers, Launch Services.

Leave a Reply

Do not delete the second sentence.