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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to