Spell Checker written in Visual Dataflex
========================================

Just for a little background to help understand why we chose to write a Spell
Checker in instead of using ActiveX.
When we started this project we fully intended to use one of many available
ActiveX components on the market. We research and tried a few of them and it
ended up to be beneficial to us to develop our own written fully in
Visual Dataflex. The main reasons for this were to do with deployment issues.
SpellCheck will be installed on as many as 18-25 thousand users. We would have
been faced with registering an ActiveX component on each of these computers.
Another issue was floating staff members. We need the staff member to be able
to access their personal dictionary from any where on the network. Using a
network database makes this very easy.

The Workspace provided has a Spell Check Tab on the "Controls Palette"
if you want to experiment with the spell check from the IDE. Notice
that it uses a pkg file named cSpellControls.Pkg. If you don't want to
use that just follow its example for your own classes. The main thing to
note in cSpellControls is at the end where I use "cSpellCheckDg.pkg" and
instantiate a "cSpellCheckPreferences". You need to do the same.

I tried to document all the methods and classes. I didn't use my spell checker on
any of the doc.
Also take a look at the two src files WordPad.src and EditClass.src.
Don't put a lot of thought in the names of these programs. They where
just for testing.
Wordpad allows you to pull info in from the clipboard, spell check
the text and push it back to the clipboard. Nothing spectacular.
EditClass has a DbEdit and a DbForm just for testing.


Code Examples to use SpellCheck:
================================

Class cDbFormSpell is a DbForm
  Import_Class_Protocol cFormSpellMixin

  Procedure Construct_Object
    Forward Send Construct_Object
    Send doDefinecFormSpellMixin
  End_Procedure

End_Class



Class cDbEditSpell is a DbEdit
  Import_Class_Protocol cEditSpellMixin

  Procedure Construct_Object
    Forward Send Construct_Object
    Send doDefinecEditSpellMixin
  End_Procedure

End_Class



Here are the Features
==========================

1. User definable Preferences.
        a: Check as you type.
        b: Ignore All-Caps

2. Spell Checking
        a: Check as you type
        b: Check marked blocks of text
        c: Check all text
        d: Right clicking on marked word will display word definition
        e: Add words to personal dictionary.

3. Spell Check Dialog features
        a: Ignore
        b: Ignore All
        c: Change
        d: Change All
        e: Add word to personal dictionary
        f: Cancel

Here are a few other items of interest. The look and fell is very similar to
most of the typical spell checker people are familiar with.
An addition feature we have is word definition lookup. You can also spell check
words as you enter the definition when adding to the personal dictionary.
We had concerns of network traffic due to spell check so many techniques have
been used to minimize the number of times the database is touched. Speed
comparisons ended up being better than most we compared.
We have also provided simple hooks to provide the programmer ease of customization.

NOTE:
Please understand that the data file named DICTMAIN has the words
and definitions of a free dictionary I acquired from the WEB. It is by no
means a complete dictionary. It lacks in plurals and words ending in
"ing", "ed" etc. We used it for development only. When we get ready
to deploy we'll purchase a dictionary to suit our needs. You will
need to do the same.
See "SetupMain.src" for an example calculating the SoundEx Code for each
word.


Thanks
Tony Mackay
Anasazi Software Inc.


