开发者

Get droplet path without making app document based

开发者 https://www.devze.com 2023-04-04 19:56 出处:网络
I have a fairly straightforward question about using droplets for my mac application. My app is not a document based app.

I have a fairly straightforward question about using droplets for my mac application. My app is not a document based app.

Is there any way to get the path of the item tha开发者_开发技巧t was dropped? How would I go about implementing this if that was the case? I have looked into this, and it doesn't look like I can do droplets at all without making my app document based, which I really don't want to do.

Thanks ahead of time!


You don't have to use NSDocument at all to make a droplet. Just include CFBundleDocumentTypes in your Info.plist (see Storing Document Types Information in the Application's Property List for details) and implement application:openFile: in your app delegate (there are variants of this method for multiple files etc.).

0

精彩评论

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