Adopted implemtantion of [checkSpelling:] to changes in

NSSpellChecker. [updateSpellingPanelWithMisspelledWord:] is now
called from here.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11301 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-11-03 09:56:02 +00:00
parent 4a1e318a22
commit cc9acbc54a

View file

@ -846,6 +846,7 @@ static NSNotificationCenter *nc;
- (void) checkSpelling: (id)sender
{
NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
NSString *misspelledWord = nil;
NSRange errorRange;
int count = 0;
@ -859,10 +860,13 @@ static NSNotificationCenter *nc;
if (errorRange.length)
{
[self setSelectedRange: errorRange];
misspelledWord = [[self string] substringFromRange: errorRange];
[sp updateSpellingPanelWithMisspelledWord: misspelledWord];
}
else
{
NSBeep();
[sp updateSpellingPanelWithMisspelledWord: @""];
}
}