Re: UTIs and writeToFile:atomically:
Re: UTIs and writeToFile:atomically:
- Subject: Re: UTIs and writeToFile:atomically:
- From: SA Dev <email@hidden>
- Date: Tue, 19 Jul 2005 09:15:11 -0400
An update:
Using mdls against one of my app's files, I see the
kMDItemContentType is dyn.##### - a dynamic type. Is this telling me
that the UTI I'm setting in my app's Info.plist is not being applied?
At this point, I'm strongly suspecting this is the case. Culling
many different metadata importer examples, I'm convinced the importer
is correct. The importer is being found (verified with mdimport -L).
The schema file is validated (via mdcheckschema). In my app, the UTI
is set to com.me.myapp.myformat to match the importer. I've run the
app from the Applications folder and even created a brand new file to
make sure everything's "fresh".
Again, using mdls, the kMDItemContentType is a dynamic type. This
tells me the problem (at least *this* problem) is that the app itself
is not properly specifying the UTI. Can anybody at least verify
whether or not my suspicions are correct? I've read the Spotlight
Importer Programming Guide a dozen times, taking it paragraph by
paragraph. The one thing it says in case an 'unexpected UTI' is
returned is to "The test file is the correct file type." Beyond mdls,
I'm not sure what else (if anything) to look for.
I'm pulling my hair out here!
On Jul 18, 2005, at 11:59 AM, SA Dev wrote:
List:
I'm finally writing a metadata importer plugin for my app. I'm
running into a bit of trouble, though, with UTIs. At least I
*think* it's UTIs. The "/usr/bin/mdimport -d1" command is returning
a dynamic UTI, claiming no importer for my doc type.
Here's the thing: My app is a project-based app with a project
control file and many supporting files (both file types are my own
format). The project control file is not indexed.
The supporting document files are *not* saved using the standard
save commands, but rather are archived using NSArchiver during a
hand-rolled save method. The document type is declared in my
target's document types with a proper com.me.myapp.mydoctype UTI.
My question is, if I'm using [someDictionary writeToFile:path
atomically:YES] to save the file with the 'mydoctype' extension
associated with the UTI, will the importer pick it up? ... or do I
need to use the proper -save and -open mechanisms built into the
NSDocument architecture?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden