在系统范围内更改可可单词补全 - 可能吗?

发布于 2024-12-03 01:04:13 字数 151 浏览 0 评论 0原文

在您自己的应用程序中,从 NNTextView 修改单词补全就像实现 textView:completions:forPartialWordRange:indexOfSelectedItem:

是否有任何方法可以为其他应用程序执行 tjis,即替换或增强内置单词补全建议?

In your own app modifying the word completions from NNTextView is as simple as implementing textView:completions:forPartialWordRange:indexOfSelectedItem:

Is there any way to do tjis for other apps, that is replacing or augmenting the built-in word completion suggestions?

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

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

发布评论

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

评论(1

够运 2024-12-10 01:04:13

是的,在某种程度上。您需要编写一个拼写服务器。安装后,您可以在系统首选项中选择默认的拼写检查器。有关文档,请参阅 Apple 的介绍和详细信息参考文献,例如 NSSpellServer

然而,我不认为你可以在你自己的拼写服务器中实现苹果标准拼写/语法检查器所做的一切;比较 NSSpellServer 需要实现的方法列表,以及方法 NSSpellChecker 有。 Apple 正在慢慢向 NSSpellServer 添加与 NSSpellChecker 相对应的方法...让我们希望 Apple 能尽快做到这一点。

Yes, to some extent. You need to write a spell server. Once installed, you can select the default spell checker in the system preferences. For documentation, see Apple's introduction and detailed references, e.g. for NSSpellServer.

However, I don't think you can implement everything in your own spell server what Apple's standard spell/grammar checker does; compare the list of methods NSSpellServer needs to implement, and methods NSSpellChecker has. Apple slowly adds to NSSpellServer the methods which correspond to those of NSSpellChecker... let's hope Apple does this quickly.

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