LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
kiranholla

Enum Constant : Size changes when inserting new element in BD

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

Generally type def Enums are used in LabVIEW application extensively as in other programming languages.

 

But in LabVIEW, Unlike Enums in Front Panels when using an Enum as a constant in block diagram : as index element for array, or element in an array or cluster, the size of the constant enum changes whenever that enum is modified.

 

Always this leads to hidden code, a violation of LabVIEW coding standards which can result in a potential bug.

 

Solution:

Like in Front Panel, keep the size of the enum as a constant in Block Diagram the same size, without hidding the text in the enum.

 

 

 

 

 

2 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

It can lead to this kind of consequence too.

Your suggestion could be implemented as an option similar to the "size to text" of strings (so that people who are fine with the current behavior could just ignore it). However, since there is no "size handle" on an enum constant, it sounds like a lot of work for a cosmetic glitch. Moreover, it might make it difficult to distinguish between values (say: "this is a very long element name 1" and "his is a very long element name 2".

As far as violating LabVEW coding standards, currently this is not even a misdemeanor, so relax!

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.