utils.spellcheckdialog

Spell-checker dialog

Prototype

action, replacement = utils.spellcheckdialog (word, suggestions)

Description

This invokes a GUI dialog box, intended for use with a spell checker.

It is called with two arguments, the first being the misspelt word, the second being a table of suggested replacement words.

If this dialog is cancelled, utils.spellcheckdialog return nil.

Otherwise, it returns two things (which are strings): action, replacement

The action can be one of: The replacement is the replacement word - if the user chose "change" or "changeall" (or double-clicked a suggested word).

eg.

print (utils.spellcheckdialog ("fod", {"food", "fodder"} ))  --> change food

Lua functions

Topics