Autocorrect is extremely flakey.
I was trying to figure out when it works and when it doesn’t.
This code demonstrates some cases where it fails, though probably not all.
If the meaning of the variable names is not apparent to you, you may have to type the code in to understand what’s happening, because then you’ll see Codea’s behavior as you type each letter.
But reading the names over may help make it clear happening in each case, without you having to manually type in anything.
In the cases of the variable names on the left side of the equals sign, they tell you whether the autocompletion attempted on that line succeeded.
So the line beginning succeedsInAutocompletion
shows an instance where the autocompletion worked, in other words, when Codea noticed the letters for the beginning of the variable name on the right side of the equals sign being typed in, it suggested the correct completion.
The lines beginning with terms that indicate failure, such as doesNotAutocompleteHere
and `butHereAgainCompletionFails," show instances where, when Codea noticed the letters for the beginning of the variable names on the right side of the equals sign being typed in, it did not suggest the correct completions.
In the same vein, the line beginning theFollowingVariableNameActuallyDoesAutocompleteHereIfYouCanBelieveIt
indicates an instance in which, when Codea noticed the letters for the beginning of the variable name on the right side of the equals sign being typed in, it suggested the correct completion, and doing so was somewhat improbable, given that it did not correctly suggest completion for the variables on the right side of the equals sign in either the previous case or the following case.
So as you see, lines beginning with terms that indicate success signify that autocompletion performed correctly on them, and lines beginning with terms that indicate failure signify that autocompletion failed to perform correctly.
As for the names of the variables on the right side of the equals sign, in other words the variables that themselves either correctly or incorrectly triggered autocompletion suggestions, they describe the circumstances in which completion is being attempted.
So in the case of the line where self.autocompletesInsideInstanceFunction
is on the right side of the equals sign, autocompletion is being attempted inside a function belonging to an instance of the class that declared the variable itself.
In the line where instance.completionAfterInstantiationAtRoot
is on the right side of the equals sign, autocompletion is being attempted at the root level, after instantiating the class, on that instance of the class.
In the line where instance.autocompletesInsideARootFunction
is on the right side of the equals sign, autocompletion is being attempted inside a root function, again on the same instance of that class.
@Simeon I don’t know if tuning-up autocompletion is any kind of priority, but personally, it sure helps a lot when it works. If that’s on your list, hopefully this can help in debugging it.