Display non-existing variables differently in the editor

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Display non-existing variables differently in the editor

Unread post by Rainer Oehry »

I would like to see invalid references to variables (names of non-existing/no longer existing variables) displayed differently, at least for the "button" variables — as a suggestion, the button could be colored in a light yellow/orange/red as opposed to the light blue.

I am aware that this would increase the amount of processing that the editor has to handle when opening a topic, which could result in the displaying of the topic being further delayed by a fraction of a second, but I believe this to be worthwile.

When changing the name of a variable "in place" whithin a button (instead of choosing another variable from the popup list), the checking could be done in real-time — the button turns "red" as long as the current variable name is not valid, and turns blue again as soon as it is valid again, that is, points to an existing variable.

Thank you for considering.
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Display non-existing variables differently in the editor

Unread post by Tim Green »

Hi Rainer,

Highlighting "invalid" variables would not really be valid, because it is quite possible to define variables that don't exist in the skin during publishing in a number of ways: with a skin, in the Publishing Task Manager and in publishing with a batch file with a /V switch for a variables definition file. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: Display non-existing variables differently in the editor

Unread post by Rainer Oehry »

Hi Tim,

I understand your position, but I am not convinced.

it is common for programming editors to display objects like variables, functions or classes that are not known/not defined yet in a different color. This serves as a warning that the developer has to take care of a potential problem. If, after inspection, it is clear that there is in fact no problem, because the missing definitions will be added later, by importing additional modules, and/or during compiling/linking/whatever, the warning can be safely ignored. Just because not all warnings turn out to be real problems, this does not make those warnings useless from the beginning.

I still think that it could be helpful to be informed about variables that are unknown "locally". The user could apply a meaningful naming convention — all variables that should be defined locally could start with LOC_, and all others start with something different. So as soon as I see an unknown variable starting with LOC_, I know that I need to take care of that, all others I can safely ignore, at least for now.

I would really appreciate if you could give this matter another thought.
Last edited by Rainer Oehry on Thu Sep 06, 2018 9:45 am, edited 1 time in total.
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23154
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Display non-existing variables differently in the editor

Unread post by Tim Green »

Hi Rainer,

It's not that we're not considering it; it's just that there are caveats regarding the validity of the display. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: Display non-existing variables differently in the editor

Unread post by Rainer Oehry »

Thank you, Tim, I really appreciate that.

You could also make this a configuration option for the editor — "Display unknown variables in a different color?"
Users who feel distracted by that feature would simply not turn it on …
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
Post Reply