(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSSpellChecker 

Inherits From:	NSObject 

Declared In:	appkit/NSSpellChecker.h 

Making A Checker Available 

+ (NSSpellChecker *)sharedSpellChecker	Returns the NSSpellChecker (one per application). 
+ (BOOL)sharedSpellCheckerExists	Returns whether the application's NSSpellChecker has already been created.

Managing The Spelling Panel 

- (NSView *)accessoryView	Returns the spell panel's accessory NSView object. 
- (void)setAccessoryView:(NSView *)aView	Makes an NSView object  an accessory of the spell panel by making it a subview of the panel's content view.
- (NSPanel *)spellingPanel	Returns the NSSpellChecker's panel. 

Checking Spelling 

- (int)countWordsInString:(NSString *)string	Returns the number of words in string.
- (NSRange)checkSpellingOfString:(NSString *)stringToCheck
startingAt:(int )startingOffset	Starts the search for a misspelled word in stringToCheck  starting at startingOffset within the string object.  Returns the range of the first misspelled word.  Wrapping occurs but no ignored-words dictionary is used.
- (NSRange)checkSpellingOfString:(NSString *)stringToCheck
startingAt:(int)startingOffset	Starts the search for a misspelled word in stringToCheck
wrap:(BOOL)wrapFlag		starting at startingOffset within the string object.
inSpellDocumentWithTag:(int)tag		Returns the range of the first misspelled word and
wordCount:(int *)wordCount		optionally the word count by reference.   tag is an identifier unique within the application used to inform the spell check which document (actually, a dictionary) of ignored words to use.  wrap determines whether spell checking continues at the beginning of the string when the end is reached.

Setting the Language 

- (NSString *)language	Returns the current  language used in spell-checking.
- (BOOL)setLanguage:(NSString *)aLanguage	Sets the language to use in spell-checking to aLanguage.  Returns whether the Language pop-up list in the spelling panel lists aLanguage.

Managing the Spelling Process 

+ (int)uniqueSpellDocumentTag	Returns a guaranteed unique tag to use as the spell-document tag for a document.  Use this method to generate tags to avoid collisions with other objects that can be spell-checked.
- (void)closeSpellDocumentWithTag:(int)tag	Notifies the NSSpellChecker that  the user has finished with the ignored-word document identified by tag, causing it to throw that dictionary away. 
- (void)ignoreWord:(NSString *)wordToIgnore	Instructs the NSSpellChecker to ignore all future 
inSpellDocumentWithTag:(int)tag		occurrences of wordToIgnore in the document identified by tag.  You should call this method from within your implementation of the NSIgnoreMisspelledWords protocol's ignoreSpelling:.
- (NSArray *)ignoredWordsInSpellDocumentWithTag:(int)tag
	Returns the array of ignored words for a document  identified by tag.  Invoke this before closeSpellDocument: if you want to store the ignored words.
- (void)setIgnoredWords:(NSArray *)someWords	Initializes the ignored-words document (i.e., dictionary  
inSpellDocumentWithTag:(int)tag	 	identified by tag with someWords, an array of words to ignore.
- (void)setWordFieldStringValue:(NSString *)aString
	Sets the string that appears in the misspelled word field using the string object aString.
- (void)updateSpellingPanelWithMisspelledWord:(NSString *)word
	Causes NSSpellChecker to update the spelling panel's misspelled-word field to reflect word.  You are responsible for highlighting word in the document and for extracting it from the document using the range returned by the checkSpelling:... methods.