我正在为Mac开发一个cocoa应用程序,我需要的是在用户右键单击特定文件和文件夹时(即当用户按键盘的ctrl键单击文件或文件夹时)出现的上下文菜单中添加一个项目。
我是 Cocoa 应用程序开发的新手。我在google上搜索了一下,发现可以使用CFPlugIn来实现。有谁知道如何使用 CFPlugIn 来实现这个或任何其他方法来在特定文件或文件夹的上下文菜单中添加项目?
提前致谢
I am developing an cocoa application for Mac and what i need is to add an item in the context menu that appears when user right-clicks on specific file and folder (i.e. when user click on file or folder by pressing ctrl key of keyboard).
I am new to Cocoa application development. I have searched in google for it and found that it can be implemented by using CFPlugIn. Does anyone know how to use CFPlugIn to implement this or any other method to add item in context menu of specific file or folder??
Thanks in advance
发布评论
评论(3)
您可以使用系统服务作为上下文菜单。您应该参考服务实施指南 。请查看Snow Leopard 中的服务步骤一文。< br>
如果您想在苹果应用商店上销售您的产品,那么您不应该关注 dropbox。
You can use system services for contextual menu. you should refer Services Implementation Guide. take a look at Services step out in Snow Leopard article.
If you wish to sell your product on apple app store than you should not follow dropbox.
Mac OS X 10.6 和 Mac OS X 10.7 不再支持此功能。 Mac OS X 的早期版本支持上下文菜单插件,但此功能已被删除。
从更广泛的意义上来说,你想实现什么目标?如果您让我们了解您的目标是什么,我们也许可以建议实现该目标的替代方法。
This is no longer supported in Mac OS X 10.6 and Mac OS X 10.7. Earlier versions of Mac OS X had support for contextual menu plugins, but this feature has since been removed.
What is it you're trying to accomplish in the broader sense? If you give us an idea of what your goal is, we may be able to suggest an alternate way to accomplish it.
使用系统扩展和 FinderSync 扩展您可以实现此目的。
https://developer.apple.com/library/内容/文档/常规/概念/ExtensibilityPG/Finder.html
Using System Extensions and a FinderSync extension you can accomplish this.
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html