I am sorry but this looks like this is a bug in the documentation. This feature is not fully implemented but got documented by accident. We will try to get the documentation corrected as soon as we can. Please just set tables into this attribute. Sorry for the inconvenience.
Thanks for the reply Jon. It would be great, though, if it worked as advertised.
In the meantime the funktion call works. SDK states to use "myCompletion( view, partialWord )". I assumed, the call would be similar to a function call of "validate", like
validate = function(view, value)
-- do my stuff, using "value"
return true, value
But this syntax works not at "completion". Instead
completion = myCompletion( view, partialWord ) -- returning a table of strings
works, but I don't know, how to set the parameter "partialWord".
Any hint or code snipplet is welcome!
I could help myself.
First, and of course, there are no syntax differences – it was my fault.
Second, the parameter "partialWord" has to be set by me. I took the value of the edit field. My assumption is, this might be the most usual case.
Again, an addition according to "edit_field's "completion" property can be a table of strings or a function".
It can be a table of strings at both, Windows and macOS.
It can be a function at macOS, not at Windows. At Windows it yields too an error.