Interface TextControl::getCustomDictionary
Description
In BBj 7.0 and higher, this method returns the name of the server-side file that contains new words added to the dictionary.
Syntax
Return Value |
Method |
string |
getCustomDictionary() |
Parameters
None.
Return Value
Returns the name of the custom dictionary file on the server.
Remarks
The default custom dictionary filename is CUSTOM.DIC. Change this by specifying a filename in STBL("!DICTIONARY").
Example
rem ' getCustomDictionary
SYSGUI=UNT
OPEN (SYSGUI)"X0"
sysgui! = BBjAPI().getSysGui()
window! = sysgui!.addWindow(200,200,400,400,"Spell-Check getCustomDictionary",$00010003$)
cedit! = window!.addCEdit(102,25,50,350,325,"",$0100$)
cedit!.setLineWrap(1)
gosub InitText
Locale$ = stbl("!LOCALE","en_GB")
cedit!.setCustomDictionary("Jabberwocky.dic")
cedit!.setSpellChecked(1)
print "Using custom dictionary: ",cedit!.getCustomDictionary()
words!=cedit!.getMisspelledWords()
if words!.size() then
: for word=0 to words!.size()-1;
: word$ = words!.get(word);
: print "Add to "+cedit!.getCustomDictionary()+": "+word$;
: cedit!.addWord(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
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.