2005-03-18
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 2 of 3 )
Customizing Dictionaries
The quick-and-speedy plug-in feature is cool and fun, but that doesn't mean much if the dictionary is bad or inappropriate. Addictive (the company, that is) keeps a Web-page of user-maintained dictionaries on its site, wherein they point out that, for spell-checking, bigger is not necessarily better. This is true, particularly, of American English, where last century's spellings are this century's misspellings.
The site provides dictionaries for a wide variety of languages, from Afrikaans to Swedish, as well as a smattering of specialized dictionaries for medical, legal, technical, and Biblical work. In addition, you can build your own dictionaries, and allow your users to add items to specific dictionaries, just as in your favorite word processor. More importantly, the controls give you a very fine-grained access to various events, meaning that you can control just about every aspect of your spell checking, from auto-correction to case-checking.
Ignore Control
Addict uses what they call an "Ignore Object" to allow you to skip over sections of text you don't want to have spell checked, includes built-in ignore objects for HTML and other likely candidates. Inside this ignore object, you've got considerable latitude to figure out whether or not to pass something by the checker.
About the only thing I couldn't figure out how to do easily was ignore text based on its format. Sensibly, the tool gives you access to the raw text, but no direct read-access to the control itself. This also makes sense, at least given the constraints of the current object-oriented paradigm used in Delphi.
To get the desired result, I built a blocker that was aware of the form and control it was going to be used on. This is cheating, but it worked. In the process of building my "cheat," however, I found the way it's supposed to be done.
Addict communicates with controls through an object tree called TControlParser. For any new control (or to extend the power of existing interactions, presumably) you build a new TControlParser. Once you've built the interface, it works for both the dictionary and the thesaurus tools.
![]() |
|


