SimpleSpell Usage

Written by Administrator on .

Methods

SimpleSpell.Register ( name as String, code as String ) As Boolean

This method is used to register your copy of SimpleSpell.  Pass the 'name' and 'code' you recieved when you purchased SimpleSpell to the method and if it returns 'True', you are registerd.  If not, your built applications will have a popup window when it first launches stating that the application is using an unregistered version of SimpleSpell.  NOTE:  This method has to be passed before 'Initialize'.

SimpleSpell.Initialize ( Dictionary as FolderItem ) As Boolean

This method initializes simplespell with the dictionary you wish to use.  If the method returns 'True', you are ready to go.  If the method returns 'False', the dictionary file did not load and spell checking will not work.

SimpleSpell.Check ( data as String, findSuggestions as Boolean, reset as Boolean ) As Boolean

This method begins the process of checking whatever string (the text of a TextField, a TextArea or just a String containing words) is passed to it via 'data'.  You can pass a single word or a complete document out of a TextArea.  You will continue passing 'data' to SimpleSpell until all the words in data have been checked.
If you pass 'True' to 'findSuggestions' then when a misspelled word is found, the suggestions to correct that word will be placed in the SimpleSpell.Suggestions() array.
If reset is passed 'True' then SimpleSpell will reset it's internal variables and start over with whatever string is passed to it in 'data'.

SimpleSpell.Change ( correctedWord as String )

This method needs to be passed each time you have SimpleSpell correct a word that it has found to be misspelled.  SimpleSpell will use the 'correctedWord' to adjust the start position for the next word in 'data'.

SimpleSpell.IgnoreWord ( word as String ) As Boolean

This method adds 'word' to the global ignore list.  This is a custom dictionary that SimpleSpell stores in SpecialFolder.ApplicationData.Child ( "SimpleSpell" ).Child ( "SimpleSpell Ignore Dictionary" ).  This is a global dictionary that will load with any application that uses SimpleSpell.  Returns 'True' if SimpleSpell successfully added the word to the ignore list.

SimpleSpell.LearnWord ( word as String ) As Boolean

This method adds 'word' to the global custom dictionary.  This is a custom dictionary that SimpleSpell stores in SpecialFolder.ApplicationData.Child ( "SimpleSpell" ).Child ( "SimpleSpell Learn Dictionary" ).  This is a global dictionary that will load with any application that uses SimpleSpell.  Returns 'True' if SimpleSpell successfully added the word to the custom learn dictionary.

SimpleSpell.SkipWord ( word as String ) As Boolean

This method adds 'word' to the in memory based custom dictionary.  This is a custom dictionary that SimpleSpell stores in memory during application run time.  This dictionary only remains intact while the application is still running.  Returns 'True' if SimpleSpell successfully added the word to the skip list.

Properties

SimpleSpell.start As Integer

This property contains the start location of the current found misspelled word in respects to the string passed to SimpleSpell.Check.

SimpleSpell.length As Integer

This property contains the length of the current found misspelled word in respects to the string passed to SimpleSpell.Check.

SimpleSpell.MisspelledWord As String

This property contains the current misspelled word. 

SimpleSpell.SuggestionLimit As Integer

This property contains the current misspelled word.

SimpleSpell.Suggestions() As String

This property contains the suggestions that SimpleSpell found for the current misspelled word (assuming you passed 'True' for 'findSuggestions' in SimpleSpell.Check).

SimpleSpell.Aggressive As Boolean 

This property tells SimpleSpell to be very aggressive in finding suggestions (sometimes it can be too aggressive and have so many suggestions that the spelling you want falls out of the SuggestionLimit.

SimpleSpell.LastMessage As String

This property will contain information about the last misspelled word, for example, what dictionary was the word found in.  ie.  Main Dictionary, Ignore Dictionary, Learn Dictionary, Skip List

SimpleSpell.LastError As String

This property will contain information about the last error message that SimpleSpell generated.