Re: Overlapping Extensions and UTIs in NSDocument
Re: Overlapping Extensions and UTIs in NSDocument
- Subject: Re: Overlapping Extensions and UTIs in NSDocument
- From: "Sean McBride" <email@hidden>
- Date: Thu, 29 May 2008 10:55:15 -0400
- Organization: Rogue Research
On 5/29/08 3:20 PM, Markus Müller said:
>Could it be that it's not allowed to have UTIs with overlapping extensions?
Bingo. LaunchServices does a 1-to-1 mapping between a file and a UTI.
That is, a file can have only 1 UTI. So if two UTI declarations claim
the same extension you are screwed. See the quicklook-dev archives for
more info. A workaround I tried was to use an HFS file type, but alas
the system gives priority to extensions even in the case of conflict.
So if you have 2 UTIs:
1) UTI: com.UTI1
type: 'TEXT'
ext: .mm
2) UTI: com.UTI2
type: 'FOO '
ext: .mm
and ask LS for the UTI of a file that has extension .mm and type 'FOO '
LS might return 'com.UTI1'.
And please file a bug. Mine come back 'behaves as expected' so I think
Apple needs convincing.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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