User | Kudos |
---|---|
7 | |
6 | |
3 | |
3 | |
3 |
Every control or indicator in LV has got a label and a caption.
If I understand the purpose of those two items correctly, the label is used as some kind of unique and (at runtime) unchangeable identifier, while the caption is a text to display on the front panel, change at runtime etc.
I don't understand, why it's possible to have several controls with identical labels.
I agree that it would be kind of hard to force labels to suddenly be unique (it might even break some code), so I would like to have an option to do this.
In the VI settings there should be the option "force unique labels for controls & indicators".
The default for new VIs should be set in a global option "force unique labels for controls & indicators for new VIs".
For existing VIs this option should be set to false, so we don't break any existing code.
When this setting is changed from false to true, LV should check if there are any duplicate labels on the diagramm.
If there are any duplicate labels, LV should show a message to inform the user that hitting the OK button now will change some of his labels.
If there aren't any duplicates, the change should be applied without any further notice.
You ask yourself, why I don't like duplicate labels?
They lead to VIs that are very hard to debug if you are using property/invoke nodes.
They lead to even more problems if you are using property/invoke nodes to access controls using their labels.
It just doesn't feel right to have two elements with the same name. That's a bit like having two variables with the same name but different content in other programming languages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.