| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
This class enables creation and loading of spelling metadata including rules and dictionary data
enableDictionarySplit:Boolean| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
This is a flag that enables/disables loading of dictionary in splits.
By default this flag is set to false. In case the initial loading time of dictionaries is found slow, this flag should be set to true. By enabling this, squiggly will load dictionary in splits with each split having wordsPerDictionarySplit number of words.
NOTE: This property, if used, should be set before calling HunspellDictionary.load. Once HunspellDictionary.load is called dictionaries will be loaded according to default values, and this property will not be used.
Implementation public function get enableDictionarySplit():Boolean public function set enableDictionarySplit(value:Boolean):voidloaded:Boolean [read-only]
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
A flag that indicates if the dictionary has finished loading.
Implementation public function get loaded():BooleanwordsPerDictionarySplit:int| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
This property defines the number of words in one dictionary split.
By default the value of this property is set to 20000 words. This property is used only if enableDictionarySplit is set to true. If enableDictionarySplit is set to flase this property turns void.
NOTE: This property, if used, should be defined before calling HunspellDictionary.load. Once HunspellDictionary.load is called dictionaries will be loaded according to default values, and this property will not be used.
Implementation public function get wordsPerDictionarySplit():int public function set wordsPerDictionarySplit(value:int):voidpublic function HunspellDictionary()| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
Constructs a new HunspellDictionary which can later be used by a SpellChecker object.
public function load(rulesURL:String, dictionaryURL:String):void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10 |
Loads a Hunspell dictionary and corresponding rules files as specified by the dictionaryURL and the rulesURL.
The actual loading is done asynchronously and
the HunspellDictionary object will dispatch an Event.COMPLETE event.
When an error condition occurs, it will dispatch an IOErrorEvent.IO_ERROR event.
Parameters
| rulesURL:String — The URL of rule file to be loaded.
|
| |
| dictionaryURL:String — The URL of Dictionary file to be loaded.
|
Example The following code shows how load API is called to load a Rule and Dictionary file to create a HunspellDictionay.
private var _newdict:HunspellDictionary = new HunspellDictionary();
_newdict.load("dictionaries/en_US/en_US.aff", "dictionaries/en_US/en_US.dic");
Fri Oct 24 2014, 03:33 PM +11:00