Casting an int to an Enum (strict).
Who thought it would be so tricky? Turns out that although I had expected each of the last 4 methods to be functionally equvellent I was wrong.
I guess you really do learn something new every day.
This NI document explains typecasting an integer into an enum.
Just when I thought I knew something about LabVIEW!
Thanks Jim! I wondered WHY- now I know.
Here is one that I also consider bad programming practice.
Setting a typedef enum as Use Default If Unwired always returns the FIRST (lowest number) in the enum. If you right click and create a constant, you will get whichever state was set to Make Current Value Default. This may be different from what the output is when left unwired. The default state is not shown and you have to look at the typedef to find out which will be the output.
Related - if someone rearranges the typedef enum (moves some other text to the first element) then the output of the unwired terminal changes. The state when you create a constant does not.
I think I would prefer a "Create Constant in Unwired Cases" option to use here.
You have a value changed event for a combo box with Allow Undefined Strings deselected. You try to enter an invalid string into the combo box the system beeps an error at you and the control is not updated. As soon as you click somewhere else on the FP but the value changed event fires anyway. If you press escape prior to clicking away from the control the event is not fired.
Bug or intended behavior?
See this thread for more info.
When working with the 3D Graph in the 3D Picture, I got bit.
A is not equal to B
Since I cut-n-pasted from an example I ASSumed that the wire was run behind the structure and worked with the value from "A" right up until I tested it.
Please note the tiny arrows indicating an Input AND an Output.
Can anyone else recall seeing another one these anywhere else?