Re: File types...
Re: File types...
- Subject: Re: File types...
- From: Quincey Morris <email@hidden>
- Date: Mon, 26 Mar 2012 23:45:48 -0700
On Mar 26, 2012, at 23:14 , Randy Widell wrote:
> Now…everything goes wrong when I try to open a file. Opening the recently saved document just gives the error: "The document '…' could not be opened. My App cannot open files of this type." If I try to select the file in the open panel, the document is just gray.
I'd suggest you try using a combination of NSDocumentController's 'recentDocumentURLs' and 'typeForContentsOfURL:error:' methods to examine the type actually being determined for the files. (It's not certain from the NSDocumentController documentation that it actually uses 'typeForContentsOfURL:error:' to "determine the type of the file", but it'd be worth knowing what that method produces anyway.)
It seems possible to me that Launch Services is involved in this type determination (perhaps via NSWorkspace), while all the other steps you describe don't seem to involve Launch Services. Perhaps Launch Services isn't aware of your app yet.
Other complicating factors might potentially be that your extension isn't unique to your app after all, or that your app's bundle ID isn't unique to the app after all.
_______________________________________________
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