简体   繁体   English

从Objective-C OSX打开“拼写和语法”窗口

[英]Open “Spelling and grammar” window from objective-c osx

I'm implementing a menu to our Mac OSX application. 我正在实现Mac OSX应用程序的菜单。 I a menu item with the standard "Spelling and grammar" to be opened when clicking. 单击时将打开带有标准“拼写和语法”的菜单项。

Can't seem to find anywhere info on how to open this window from code. 似乎找不到任何地方有关如何从代码中打开此窗口的信息。 I assume this window is standard in OSX rather then implemented by all applications. 我认为此窗口是OSX中的标准窗口,而不是所有应用程序都可以实现。

https://developer.apple.com/library/mac/Documentation/Cocoa/Conceptual/SpellCheck/SpellCheck.html#//apple_ref/doc/uid/10000092-SW1 https://developer.apple.com/library/mac/Documentation/Cocoa/Conceptual/SpellCheck/SpellCheck.html#//apple_ref/doc/uid/10000092-SW1

does not provide any information about opening the window but just how to spell-check. 不提供有关打开窗口的任何信息,而仅提供拼写检查的信息。

NSSpellChecker使您可以访问spellingPanel ,然后可以像常规窗口一样打开(NSPanel是NSWindow的子类,因此您可以访问makeKeyAndOrderFront: ”之类的东西)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM