如何停止 OS X Core Data Spotlight 帮助标签显示外部记录文件路径?

发布于 2024-10-02 02:11:38 字数 532 浏览 0 评论 0原文

我正在为 OS X 10.6 开发一个非基于文档的核心数据应用程序。它基于 XCode 3.2.4 在选中“创建基于文档的应用程序”且选中“使用核心数据进行存储”和“包含 Spotlight 导入程序”时生成的模板。强>检查。

我的聚光灯导入器将 kMDItemDisplayName 设置为主数据库表的行的摘要。没有设置其他 kMDItem 属性。不从持久存储导入任何元数据,仅从外部记录文件导入元数据。

一切正常,但有一个例外:

当我将鼠标悬停在 Spotlight 结果上时,黄色帮助标签显示相应数据库记录的外部记录文件的路径。对于普通用户来说,这看起来像是胡言乱语,即
/Users/username/Library/Caches/Metadata/CoreData/appname/uuid/entity/x/y。

有什么办法可以阻止这种情况发生吗?理想情况下,我希望帮助标签引用我的应用程序的名称。

我尝试设置其他几个 kMDItem 属性,但它们似乎不会更改显示的帮助标签。

I am developing a non-document-based core data app for OS X 10.6. It is based on the template generated by XCode 3.2.4 when "Create document-based application" is not checked and "Use Core Data for Storage" and "Include Spotlight Importer" are checked.

My spotlight importer sets kMDItemDisplayName to a summary of the row of the main database table. No other kMDItem attributes are set. No metadata is imported from the persistent store, only from the external record files.

Everything works fine with one exception:

When I hover my mouse over a Spotlight result, the yellow help tag shows the path to the external records file for the corresponding database record. That looks like gibberish to the average user, i.e.
/Users/username/Library/Caches/Metadata/CoreData/appname/uuid/entity/x/y.

Is there any way to stop that from happening? Ideally, I would like the help tag to refer to my application's name.

I tried setting several of the other kMDItem attributes, but they don't appear to change the displayed help tag.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

薯片软お妹 2024-10-09 02:11:38

您是否尝试过设置导入器的 schema.xml 文件的 元素?如果这不起作用,请提交错误

Have you tried setting the <displayattrs> element of your importer's schema.xml file? If that doesn't work, please file a bug.

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