Packagecom.adobe.linguistics.spelling
Classpublic class UserDictionary
InheritanceUserDictionary Inheritance Object

Represents a user dictionary.

This class represents a user dictionary that is used by the SpellingService class. This class itself is an in-memory object and doesn't store persistent data. However, developers can import/export a UserDictionary object from/to a vector of String, and use other flash classes to keep the data persistent. You may want to consider using one of the following options for permanent storage:

If you are using our SpellingUI class the UserDictionary will be created behind the scene and stored in a SharedObject.



Public Properties
 PropertyDefined By
  wordList : Vector.<String>
[read-only] All words in this user dictionary.
UserDictionary
Public Methods
 MethodDefined By
  
UserDictionary(wordList:Vector.<String> = null)
Constructs a new UserDictionary which can later be added to a SpellingService object.
UserDictionary
  
addWord(word:String):Boolean
Add a word to the user dictionary.
UserDictionary
  
removeWord(word:String):Boolean
Removes a word from the user dicitonary.
UserDictionary
Property Detail
wordListproperty
wordList:Vector.<String>  [read-only]

All words in this user dictionary.


Implementation
    public function get wordList():Vector.<String>
Constructor Detail
UserDictionary()Constructor
public function UserDictionary(wordList:Vector.<String> = null)

Constructs a new UserDictionary which can later be added to a SpellingService object.

Parameters
wordList:Vector.<String> (default = null) — A vector of words (String) to be added as the initial entries of this UserDictionary

See also

UserDictionary.wordList
Method Detail
addWord()method
public function addWord(word:String):Boolean

Add a word to the user dictionary.

Parameters

word:String — A word to be added to this UserDictionary.

Returns
Boolean — true if the operation is successful. false if the operation is failed, for example if the word is already added.

See also

UserDictionary.removeWord()
removeWord()method 
public function removeWord(word:String):Boolean

Removes a word from the user dicitonary.

Parameters

word:String — A word to be removed from this UserDictionary.

Returns
Boolean — True if the operation was successful, false if the operation was failed, for example if the word doesn't exist in the dictionary.

See also

UserDictionary.addWord()