开发者

Associate file type/extension to non document based cocoa application

This is for some reason really hard to find and solve. Cannot find any documentation on it. I'v开发者_Python百科e got a non-document based application which I would like to open all specific file types, but I do not want to use NSDocuments but let my code handle the opening of file and processing of it. I've added the CFBundleTypeExtensions and all, settings to the info.plist.

Now the application will open the filetype but display an error like: "The document xxxx could not be opened. Application cannot open files in the yyyyy format."


Have you implemented -application:openFile: in an app delegate? If not, your application has no way of knowing how to open some random file in some random format. It's up to you to add that functionality and respond with success or failure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜