I recently submitted (as a bug) the fact that, when I have a control that is type defined (or strictly type defined), the 'Value' property node does not propagate the type definition. The documentation for the 'Value' property states that the data type is "Labview Variant". But... when I use the 'value' property, the data type is always the type of the underlying control, *except* for that, if the control was a type-defined (strict or non-strict) control, the resulting value (indicator, control, or constant) is disconnected from the typedef.
I *never* get the purple line and data type 'variant' that the documentation would suggest.
It's my belief that the disconnectiion from the type definition is both incorrect behavior, and a bug... and that the correct way to document the value property is that it returns a data type that matches the underlying control, not the Labview variant data type.
This is especially egregious when you pass a control reference to a SubVI and create a local copy of the indicator, constant, or control that you can use in the SubVI, perhaps with the intent of updating the control passed by reference before returning to the caller. If the control happens to be a cluster that is strictly type defined, and the structure of that contents is changed, the created controls, indicators, and constants derived from the reference will have the OLD cluster definition if the 'value' property disconnected from the strict type definition. This means that the SubVI not only needs to have it's logic updated to match the new cluster definition (if required, it could use elements that didn't change in the cluster definition), but it also means that you have to go back and update each and every control, indicator, and constant because even if the 'value' property now returns the correct contents, the containers you created to hold those contents are now incorrectly typed.
I was told by Labview tech support that:
"this is the way LabVIEW is currently programmed to function. Because of the generality and flexibility of property nodes, they do not maintain their strict type definition once passed through the property node. While the strict type definition and the characteristics of the front panel control/indicator may not be maintained by the property node, the integrity of the data is still intact. The property node coerces the data to fit a type it understands and then writes the data to the control. The data will still be the correct type, will have the correct data, and will have the same looking controls/indicators."
This supports the notion that the documenation ("'value' property returns Labview variant) is simply incorrect. It also support my contention that the type definition disconnection is a bug, is erroneous behavior. I've noticed that *sometimes* the type definition is NOT disconnected, although I have not been able to determine what controls that behavior; but note that in the response to my question from tech support, they state that the "strict type definition ... may not be maintained by the property node" (emphasis added). I think this is a flat-out bug; that the data type MUST propagate; that the connection to a type def (if there is one) is in essence part of the data type, and MUST be maintained.
I want this treated as a bug with an action item to get it fixed.
What do you think??? Should the 'Value' property return typed (and type defined) data, or should it return a Labview variant, as documented???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.