From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Intaris

Bridging the gap between strict and non-strict typedef

Status: New

Strict typedefs and non-strict typedefs differ significantly.  There's too much of a gap for me.  Sometimes I'd love a control to be somewhere in between.

 

There have been times where I wanted to force a typedef to have a constant size or colour or other parameters without having to force all other parameters to be identical.

 

It would be nice if a typedef could simply be gradually converted to strict by selecting which parameters are locked.  That way we could shoose to long only boolean text, width or colour but leave the other properties free.  VI Server would need to return an error that the type definition does no0t allow that change, but that is kind of already there for when you try to change properties of a strict typedef.

 

So by default a typedef would refer to data only (See HERE) but any further cosmetic changes (to which the datatype does NOT belong) we could simply select which parameters are locked and be done with it.

2 Comments
crossrulz
Knight of NI

My ideal situation for this are Rings/sparse enums.  I am forced to use the strict to make every instance have the same strings and values.  It would be nice to just lock the strings and values.  Perhaps this would be a way to implement this idea: Add sparse enums to LabVIEW


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
dan_u
Active Participant

This would also allow to e.g. have a "style" enum typedef (defining only the visual appearance, but not the data), then use this in specific enum typedefs which contain the data.

When modifying the style enum typedef all instances based on that would update. Currently we have to update each enum typedef if we want to change the visual appearance.