FROM : Sean McBride
DATE : Thu May 29 16:55:15 2008
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_removed>
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
DATE : Thu May 29 16:55:15 2008
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_removed>
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
| Related mails | Author | Date |
|---|---|---|
| Markus Müller | May 29, 15:20 | |
| Sean McBride | May 29, 16:55 | |
| Markus Müller | May 29, 19:57 |






Cocoa mail archive

