Argghh!! Writing comments in source code without Autocomplete

Hi guys,

Autocomplete doesn’t work anymore in a comment like ’ // since 2019R2
I need to force myself to write comments along the source-code, and with autocomplete it was allot easier…

Is this a Feature or a Bug??

Kind regards,
Erwin

It’s a bug that was fixed just before release so it didn’t make it into the current build.

<https://xojo.com/issue/57698>

Ok thanx for the info, I couldn’t find this case since there is allot!! of complains about autocomplete on the forum.

Search using the Feeedback application…

[quote=458612:@]It’s a bug that was fixed just before release so it didn’t make it into the current build.

<https://xojo.com/issue/57698>[/quote]
Just to be clear. Autocomplete was intentionally turned off for comments. What was fixed was if you had any of the comment sequences inside quotes on the line, that would also disable autocomplete for the rest of the line. So a like like this:

Url = “http://example.com” + app.

Would not autocomplete because of the // in the url.

Oh. Was there a tech reason or was it just “we dont want autocomplete in comments any more”?

Well… <https://xojo.com/issue/57502>
The request / bug report has been that AutoComplete has been working unexpectedly in Comments… and the “fix” done by Xojo seems to be to completely disable AutoComplete in comments.
Not what the Feedback Report(er) actually wanted… it wanted that AutoComplete just works correctly in Comments.
If you want to comment about Properties/Classes/Methods/… then it’a a bit unfortunate that they don’t AutoComplete at all any longer :slight_smile:

Just make a switch in the IDE turning it on or off.

auto-complete in comments are nonsense if they are not all-found-words completion…
syntax auto-complete in comments is an implementation “smell” as is no command line compilation…

We tested a number of other IDEs and none of them ran their code autocompletion engines when typing in a comment.

@Greg O’Lone

That’s not a reason : Innovation comes from those who dares to walk where nobody have walked before…

I’m not sure, how this statement stands when you start walking but are get scared to finish and start running back :slight_smile:
I don’t think that counts as Innovation …

So to finish, some support to Xojo developers : GO !!! YOU CAN DO IT !!! ALMOST THERE !!!

I prefer to not have autocomplete nor deprecation messages for commented code. Commented is as good as non-existent as far as i am concerned. So I guess that opinions diverge on this one.

Providing an option as was suggested earlier is one good way forward.

I use autocomplete in Notes and Comments all the time. It’s definitely a necessity for me as it makes documenting code much easier. Not sure who thought we needed this disabled.

i believe my habit is to remove the REM and later add it again. or wrote outside the comment and move it later into.
i think some kind of autocomplete is useful also in comments.

[quote=458661:@Markus Rauch]i believe my habit is to remove the REM and later add it again. or wrote outside the comment and move it later into.
i think some kind of autocomplete is useful also in comments.[/quote]

Yeah, but if my documentation isn’t code, but is a reference to code, that’s onerous. An example might be:

' Get a modified value from SomeModule.SomeMethod using our currentValue. Dim currentValue as Integer = 2 Dim newValue as Integer = SomeModule.SomeMethod(currentValue)

And, at times, these explanations can be 10s of lines long to fully inform the reader and contain tons of references.

IMHO, comments should not contain code… or references to code. Imagine a dictionary entry that defines a word by using the word itself. I am referring, of course, to those old fashioned books and not to the data structure with the same name. :wink:

Well written comments should document and explain code in plain language… not code words.

But then, well written code should not require much explanation. :wink:

Personally, I agree with the comment above… make it an IDE preference that can be switched on or off. Problem solved.

When explaining complex functionality, regardless of how well-written the code is, it can be necessary to explain parameters to function calls within the calling method or give an overview of the process before the code block begins. Without references, how would you refer to these parameters and the variables containing the values to be assigned to those parameters, as well as function calls in overview-style manner?

Using references when not using them as the basis for your explanation of the thing is not improper. Dictionaries often refer to the word being defined or its etymological root without issue in the explanation of the word. For your example to apply, in my opinion, the code itself would need to be:

' Object is an object. Dim Object as Object

Rather than:

' Object contains a reference to an instance of Module.Object that we'll use for XYZ Dim Object as Object

Either way, I see the removal of this functionality as a negative.

You should read the release notes or at least try to search for some specific change. It is listed there as a fixed bug.

No other Ide I know does autocomplete on comments, that was annoying.

they could have made it something that could be toggled on and off
perhaps cmd-opt-shift-a turns autocomplete on and cmd-opt-shift-a a second times turns it off
then you could toggle it on and off in comments or not as you see fit :slight_smile:

c# generate a document struct if you type ///
and then a parser can optional generate a manual of it.

Your app. Half of your users like a feature, others want to disable it (they consider it a bug - but in fact it‘s neither right or wrong). What would you do best?

  • remove for all
  • dont remove a feature - everyone can/has to live with it
  • make it a choice/preference

Just note again: this hadn‘t been reported with the intention to remove it. It‘s been reported to fix wrong suggestions)