continuous spell checking
continuous spell checking
- Subject: continuous spell checking
- From: Anton Leuski <email@hidden>
- Date: Mon, 20 May 2002 20:17:40 -0400
Can someone explain to me how to change the granularity of the
continuous spell checking in NSTextView? (short of rewriting about a
half dozen of its functions that is) The default implementation spell
checks a word at a time (as compared to batch spell checking which
handles blocks of text 4k? at a time). The problem is I do not like how
NSTextView defines the word boundaries. For example, if I have a TeX
document with TeX commands (in the form '\command'), the NSTextView does
not consider '\' as a part of the word and passes just 'command' to the
spell checker. This way a Tex-aware spell checker will mark a perfectly
legal command such as \documentclass as a misspelled word!
In the normal (non-continuous) mode the spell checker receives blocks of
text (4k at a time) and I can easily decide on the word boundaries
myself. (Did I say I'm writing a spell server here? :) ) So everything
works as expected. On the other hand, in continuous mode the text that
is legal gets red curly underline markings.
I found the function that handles continuous spell checking in
NSTextView: -(void)_checkSpellingForRange:(NSRange)a
excludingRange:(NSRange)b.
Unfortunately, a) it's private b) after experimenting with it for a
while I think it has some side effects (like setting internal fields in
NSTextView) that are not easy to recreate.
Could some kind soul explain how to modify the behavior of continuous
spell checking?
Thank you.
-- Anton
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.