Genero Desktop Client 2.20 New Features / Widgets: Genero Desktop Client 2.20 New Features |
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.
Figure 1. Spell checker window flow
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.
"<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.
<Style name="TextEdit.spellfr"> <StyleAttribute name="spellCheck" value="http://localhost:6394/fr_FR.aff|http://localhost:6394/fr_FR.dic" /> </Style>
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>