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.).
精彩评论