Interface TextControl::ignoreWord

 


Description

In BBj 7.0 and higher, this method marks a word as not misspelled in a spell checked text control.

Syntax

Return Value

Method

void

ignoreWord(string word)

Parameters

Variable

Description

word

The word to be ignored (marked as not misspelled).

Return Value

None.

Remarks

This method marks the word as not misspelled in the text control. To add the word to a custom dictionary, so that it will not be marked as misspelled in the future, use Interface TextControl::addWord.

Example

rem ' ignoreWord

SYSGUI=UNT
OPEN (SYSGUI)"X0"

sysgui! = BBjAPI().getSysGui()
window! = sysgui!.addWindow(200,200,400,400,"Spell-Check ignoreWord",$00010003$)
cedit! = window!.addCEdit(102,25,50,350,325,"",$0100$)
cedit!.setLineWrap(1)

gosub InitText

Locale$ = stbl("!LOCALE","en_GB")
cedit!.setSpellChecked(1)

words!=cedit!.getMisspelledWords()
if words!.size() then
:  for word=0 to words!.size()-1;
:      word$ = words!.get(word);
:      print "Ignore: "+word$;
:      cedit!.ignoreWord(word$);
:  next word

CALLBACK(ON_CLOSE,APP_CLOSE,sysgui!.getContext())

REM Process Events
PROCESS_EVENTS

APP_CLOSE:
RELEASE

InitText:
  Text! = new java.util.HashMap()
  while 1
    dread text$,err=*break
    cedit!.addParagraph(-1,text$)
  wend
return

data "'Twas brillig, and the slithy toves"
data "  Did gyre and gimble in the wabe:"
data "All mimsy were the borogoves,"
data "  And the mome raths outgrabe."
data ""
data ""Beware the Jabberwock, my son!"
data "  The jaws that bite, the claws that catch!"
data "Beware the Jubjub bird, and shun"
data "  The frumious Bandersnatch!""
data ""
data "He took his vorpal sword in hand:"
data "  Long time the manxome foe he sought --"
data "So rested he by the Tumtum tree,"
data "  And stood awhile in thought."
data ""
data "And, as in uffish thought he stood,"
data "  The Jabberwock, with eyes of flame,"
data "Came whiffling through the tulgey wood,"
data "  And burbled as it came!"
data ""
data "One, two! One, two! And through and through"
data "  The vorpal blade went snicker-snack!"
data "He left it dead, and with its head"
data "  He went galumphing back."
data ""
data ""And, has thou slain the Jabberwock?"
data "  Come to my arms, my beamish boy!"
data "O frabjous day! Callooh! Callay!'"
data "  He chortled in his joy."
data ""
data "'Twas brillig, and the slithy toves"
data "  Did gyre and gimble in the wabe;"
data "All mimsy were the borogoves,"
data "  And the mome raths outgrabe."

See Also

BBjAPI

BBjSysGui

BBjControl

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.