拖放放在 Cocoa 中的 Dock 图标上 - 弄乱文件关联

发布于 2024-12-22 14:43:24 字数 316 浏览 3 评论 0原文

我在我的应用程序中实现了拖放功能。该应用程序可让您打开 .kext 文件。

我使用了 -(void)application:openFiles: 并设置了文档类型: Document Types setup

一切正常,我的应用程序可以检测到 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:
Document Types setup

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七颜 2024-12-29 14:43:24

哇,答案很简单:在“文档类型”区域中勾选“文档作为捆绑包分发”框,并且图标不会改变。

Wow, the answer was simple: Tick the Document is distributed as Bundle box in the Document Types area, and the Icon doesn't change.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文