Any Reason Why Xojo's Autocomplete Doesn't Work On Method's?

Is this a missing fauture, a bug or something that hasn’t been implemented for a reason?

That is autocompletion for a class returned by a method. So for example:



File a bug report with an example project.

FWIW, AutoComplete has worked MUCH better for me for the past year or so. We use a lot of namespaces and they rarely worked and they do now.

I think it should be


You don’t name the class returned by a method, it’s parts are available right after the dot. i.e., the last line of this example was autocompleted all the way across.

[code]Class Class1
Function getClass2() As Class2
End Class

Class Class2
Function getClass1() As Class1
End Class


dim c As Class1

c = c.getClass2.getClass1.getClass2.getClass1.getClass2.getClass1.getClass2.getClass1[/code]

This keeps cropping up.
The answer is :
Because doSomething() here is not a method.
It is a function.
And a function returns a value.

To get autocomplete to work for a function you must start the line with an assignment.

This is why

c = c.getClass2.getClass1.getClass2.getClass1.getClass2.getClass1.getClass2.getClass1

produces autocomplete and


does not.

try typing

dim myClass myClass = myClass1.MethodThatReturnsMyClass2.myClass2.
and see if that works…

For me in Xojo15r2.1


does autocomplete “getClass1”.

These also autocomplete even though they return a value

c.getMyStructure.fieldName c.getMyDelegateReturningValue.Invoke c.getMyEnum

This won’t be listed in autocomplete


But lets say you have an extension method for booleans and need autocomplete help. Prefix the line with Call and it’ll autocomplete then you can remove Call (or not).

c. //method not listed call c.getBoolean.myExtension //autocompletes c.getBoolean.myExtension