Checks spelling in a text field.
Description
Returns a list of words that are possible completions for a partially entered word.
Supported on mobile client only.
Syntax
textchecker
.of_completionsforpartialword
( value eon_mobile_str_textcheckoption
astr_textcheckoption
, ref
string as_completions[]
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
eon_mobile_str_textcheckoption |
|
Check option. See variable list of eon_mobile_str_textcheckoption. |
string |
|
Returns a list of words, each of which is a completion of a partially entered word represented by range in string. If no possible completions are found, the method returns an empty array. |
Return value
Integer.
1 - Found possible completions.
0 - Found no possible completions.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Returns the words that the receiver ignores when spell-checking.
The spell checker excludes ignored words as misspelled words during the current spell-checking session only.
Supported on mobile client only.
Syntax
textchecker
.of_getignoredwords
( ref string as_words[]
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
Returns an array of strings, each of which specifies a word the receiver ignores. |
Return value
Integer.
1 - Found any ignored words.
0 - Found no ignored words.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Sets the list of words that the receiver should ignore, and the ignored words are not treated as misspelled words.
Supported on mobile client only.
Syntax
textchecker
.of_setignoredwords
( value string as_words[]
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
Sets an array of strings, each of which specifies a word the receiver should ignore. |
Return value
Integer.
1 - Success.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Gets the languages for which the text checker can perform spell-checking.
Supported on mobile client only.
Syntax
textchecker
.of_getlanguages
( ref string as_languages[]
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
Returns an array of strings representing ISO 639-1 language codes or combined ISO 639-1 language codes and ISO 3166-1 regional codes (for example, en_US). |
Return value
Integer.
1 - Success.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Gets the range of the first misspelled word encountered.
Supported on mobile client only.
Syntax
textchecker
.of_getmisspelledword
( value eon_mobile_str_textcheckoption
astr_textcheckoption
, ref
long al_start
, ref long
al_length
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
eon_mobile_str_textcheckoption |
|
Check option. See variable list of eon_mobile_str_textcheckoption. |
long |
|
Returns a long whose value is the starting position of the first misspelled word. |
long |
|
Returns a long whose value is the length of the first misspelled word. |
Return value
Integer.
1 - Found the misspelled word.
0 - Found no misspelled words.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Returns a list of words that are possible valid replacements for a misspelled word.
Supported on mobile client only.
Syntax
textchecker
.of_guessesforword
( value eon_mobile_str_textcheckoption
astr_textcheckoption
, ref
string as_guesses[]
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
eon_mobile_str_textcheckoption |
|
Check option. See variable list of eon_mobile_str_textcheckoption. |
string |
|
Returns an array of strings each of which might be a correct substitute (that is, a guess) for a misspelled word in the given range of the string. If no possible guesses are found, the method returns an empty array. |
Return value
Integer.
1 - Found possible guesses.
0 - Found no possible guesses.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Detects if the text checker has learned the specified word.
Supported on mobile client only.
Syntax
textchecker
.of_haslearnedword
( value string as_word
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
A string representing a word. |
Return value
Integer.
1 - The text check has learned the word.
0 - The text check hasn't learned the word.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Tells the text checker to learn the specified word so that it is not evaluated as misspelled.
Supported on mobile client only.
Syntax
textchecker
.of_learnword
( value string as_word
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
A string representing the word for the text checker to learn. |
Return value
Integer.
1 - Success.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Tells the text checker to unlearn the specified word.
Supported on mobile client only.
Syntax
textchecker
.of_unlearnword
( value string as_word
)
Argument Type |
Argument |
Description |
---|---|---|
eon_mobile_textcheckerex |
|
The name of the eon_mobile_textcheckerex object. |
string |
|
A string representing the word for the text checker to unlearn. |
Return value
Integer.
1 - Success.
-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.
Description
Struct.
Checks spelling.
Property
Type |
Variable Name |
Description |
---|---|---|
string |
|
The string which you want to check. |
long |
|
A long indicating where the check will begin in
|
long |
|
Starting from the position specified by
|
string |
|
The language of the words to be checked for correct spelling. This variable takes no effect on the Android OS if the text is input in multiple languages. |
The following script is in the EditChanged event for a SingleLineEdit control, used to detect if the input word is correct.
long ll_start,ll_length,ll_return1,ll_return2 string ls_return[],ls_data eon_mobile_str_textcheckoption leon_str_textcheck str_textcheck lstr_textcheck leon_str_textcheck.s_language = 'en_US' leon_str_textcheck.s_source = this.text leon_str_textcheck.l_start = 1 leon_str_textcheck.l_length = len(this.text) ll_return1 = ieon_textchecker.of_getmisspelledword ( leon_str_textcheck, ll_start, ll_length) //returns the starting position and length of the first misspelled word if ll_return1 = 1 then leon_str_textcheck.l_start = ll_start leon_str_textcheck.l_length = ll_length //IMPORTANT: passes the length to the structure so it can exactly obtain the misspelled word if cbx_1.checked then ll_return2 = ieon_textchecker.of_guessesforword ( leon_str_textcheck, ls_return) //returns a list of possible guesses else ll_return2 = ieon_textchecker.of_completionsforpartialword ( leon_str_textcheck, ls_return) //returns a list of possible completions end if if upperbound(ls_return) > 0 then lstr_textcheck.s_old = mid(this.text,ll_start,ll_length) lstr_textcheck.s_new = ls_return lstr_textcheck.l_x = parent.pointerx( ) lstr_textcheck.l_y = parent.pointery( ) openwithparm(w_rightword,lstr_textcheck) ls_data = message.stringparm if len(ls_data) > 0 then this.text = replace(this.text,ll_start,ll_length,ls_data) end if end if end if