gambafeliz wrote: ↑Thursday 9th November 2023 3:00pm You're right, I asked him what version it works for and he answered this:
AI say:
The code I provided earlier is a hypothetical example and is not associated with a specific version of Gambas. Gambas is an evolving programming language, and features can vary by version.
As of my last update in January 2022, Gambas does not include a .Completion property by default in its standard library. It's always a good practice to consult the official Gambas documentation or up-to-date sources for information on the specific features of the version you are using, as language capabilities may have changed since my last update.
but thats rubbish too.
Nothing has changed that much in gambas
Form.Completion has never existed and does not now.
AI is like talking to someone who thinks they know everything but knows very little but has a good excuse for all the wrong answers.
have a look at the suggested code.
it makes no sense at all and wouldn't work on ANY version of gambas.
Some examples of errors...
Form1.txtInput.Suggest = Suggestion (txtInput.Suggest ??)
Form1.txtInput.Completion = NEW String[3] (txtInput.Completion ??)
this code is a Sub() nested in another Sub() that you cannot do in gambas and also Completion.Selected does not exist.
' Handle the Selected event
$Completion1.Selected = Sub()
' Get the selected item from the autocompletion list
$TextBox1.Text = $Completion1.SelectedText
End
???
It's utter nonsense
and i found the OPs question clear enough (obviously not a great English speaker but that's okay, i understood)
they wanted an example of using Completion.class
so that is what I posted. (I had to figure out how to use it first by reading the wiki help) @ http://gambaswiki.org/wiki/comp/gb.form/completion
Not a load of nonsense created by a badly educated AI
It's just garbage. I can see the errors a mile away,
I don't think it's helpful to post incorrect code,
I know you were only trying to help but i really do not see how a load of rubbish code full of errors form an AI is helpful?