Skip navigation.
 
mlRe: Setting spell-checker underlines
FROM : Ivan C Myrvold
DATE : Thu Jan 10 21:05:47 2008

Den 10. jan.. 2008 kl. 18:37 skrev Douglas Davidson:

>
> On Jan 10, 2008, at 5:07 AM, Ivan C Myrvold wrote:
>

>> Is it possible to set the red wavy underline the spell checker 
>> sets, in an NSTextView?
>> That is by not using NSSpellChecker. I want to do it in my Cocoa 
>> application.
>>
>> Is it set by NSAttributedString as an attribute?

>
> It is a temporary attribute on the layout manager, 
> NSSpellingStateAttributeName.  See the Leopard AppKit release notes 
> for details.
>
> Douglas Davidson
>
>

Well, I am in fact using it for showing misspelled words.

i found out reading more in the documentation that this worked:

[oattributedTextView setSpellingState:1 range:elementRange];

where oattributedTextView is the outlet of the NTextView.

Ivan

Related mailsAuthorDate
mlSetting spell-checker underlines Ivan C Myrvold Jan 10, 14:07
mlRe: Setting spell-checker underlines I. Savant Jan 10, 17:13
mlRe: Setting spell-checker underlines Douglas Davidson Jan 10, 18:37
mlRe: Setting spell-checker underlines I. Savant Jan 10, 18:45
mlRe: Setting spell-checker underlines Douglas Davidson Jan 10, 20:44
mlRe: Setting spell-checker underlines Ivan C Myrvold Jan 10, 21:05