Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 5 - Spell Checker


Using the Spell Checker

You tell the spell checker that you're about to start spell-checking a document by calling this function:

local speller := SpellDocBegin();

Then for each word in the document, you call the function *SpellCheck. The *SpellCheck function returns non-nil if the word appears to need correction.

For words needing correction, you call the function *SpellCorrect. *SpellCorrect returns a list of possible alternate words. If you want the spell checker to temporarily remember words that have been skipped, call the function *SpellSkip. *SpellSkip remembers words for the currently spell-check session only. If you want a word to be permanently learned, call the function SpellLearn, which adds a word to the user's personal word list.

When you have finished processing all the words in the document, call the function *SpellDocEnd. This clears out the list of words that have been skipped, and it causes the learned words to be saved to the personal word list on the user store.

One way of using the spell checker is to call *SpellDocBegin when you open a document, and *SpellDocEnd when you close it. This preserves the skipped-word list for as long as the document is open.

Note that the spell checker can be used on multiple documents simultaneously.


Subtopics
Processing of Words Passed to the Spell Checker
Use of Dictionaries by the Spell Checker

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help