拖放放在 Cocoa 中的 Dock 图标上 - 弄乱文件关联
我在我的应用程序中实现了拖放功能。该应用程序可让您打开 .kext
文件。
我使用了 -(void)application:openFiles:
并设置了文档类型:
一切正常,我的应用程序可以检测到 kext 何时被删除。但是,当删除 Kext 时,我的 Mac 上的所有 Kext 图标都会更改为文件夹图标!我想这与我的应用程序弄乱文件关联有关。
有什么办法解决这个问题吗?
I've implemented a drag-and-drop function in my application. The app let's you open .kext
files.
I've used -(void)application:openFiles:
as well as having set the Document Types:
All works well, and my app can detect when the kext is dropped. However, when a Kext is dropped, all kexts on my Mac change icon to Folder icon! I guess it has something to do with my app messing with the file associations.
Is there any way around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哇,答案很简单:在“文档类型”区域中勾选“文档作为捆绑包分发”框,并且图标不会改变。
Wow, the answer was simple: Tick the Document is distributed as Bundle box in the Document Types area, and the Icon doesn't change.