TextEdit: Spell Checker
A spell checker can be provided for TextEdit fields in forms displayed in the Genero Desktop Client (GDC).
When used, the GDC underlines unknown words. Right-click on the unknown word to access a list of suggestions for the word.
Providing dictionary files
The spell checker uses Hunspell (see http://hunspell.sourceforge.net/). Hunspell is the default spell checker for OpenOffice.org or Mozilla tools.
You must provide the Genero Desktop Client (GDC) with two dictionary files for each language. These files can be downloaded from http://extensions.openoffice.org/. Extract the files in the oxt archive.
spellCheck
StyleAttribute using the following
format:"<affix file>|<dictionary file>"
You can load dictionary files via a URL, or by using the fgl_putfile()
built-in
function. If there is an error loading dictionary files, spell checking is simply not done. No error
will be reported by the application.
Loading dictionary files from a URL
spellCheck
StyleAttribute:<Style name="TextEdit.spellfr">
<StyleAttribute name="spellCheck" value="http://localhost:6394/fr_FR.aff|http://localhost:6394/fr_FR.dic" />
</Style>
Loading dictionaries using fgl_putfile
The files can be stored on the Runtime System side and can be uploaded to the GDC using
fgl_putfile()
.
<Style name="TextEdit.spellUs">
<StyleAttribute name="spellCheck" value="en_US.aff|en_US.dic" />
</Style>
The dictionariesDirectory
parameter for the standard.feInfo
frontcall can be used to get the directory where spell checker dictionary files are to be uploaded.
This ensures that the directory is correct for the current version of GDC.
Alternatively, you can specify an absolute path:
<Style name="TextEdit.spellUs">
<StyleAttribute name="spellCheck" value="file:///c:/dicts/en_US.aff|file:///c:/dicts/en_US.dic" />
</Style>