LabVIEW Idea Exchange

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

Why not removing "Invalid" & "Closed" two values of FP.Open Invoke Node

Status: Declined

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

In LabVIEW Invoke Node FP.Openinvoke-node.png

we have a parameter "State" which can only be written.

This "State" parameter have six values: Invalid, Standard, Closed, Hidden, Minimized, Maximized

If we set the parameter as Invalid or Closed, we will get an error.

Why not removing these two values here?

13 Comments
AristosQueue (NI)
NI Employee (retired)

tst: sparse enums wouldn't help here. The sparse enum and the full enum would be different types and you still couldn't interop between them, ie., wiring both to the same Equals prim would give you a broken wire.

tst
Knight of NI Knight of NI
Knight of NI

>... wiring both to the same Equals prim would give you a broken wire.

 

At first I thought "Really? I thought that they would be coerced". Then I thought "Oh, he's probably right. Just one of those corner cases you don't run into because comparing different enums isn't that common". Then I thought "Sure it is, I've seen coercions on enums often enough". So I checked, and they are coerced, and I assume their numeric value is compared, but I agree with you that this wouldn't be a good solution. Merging different enums isn't very good even if there were sparse enums which were representing the same thing.


___________________
Try to take over the world!
Darren
Proven Zealot
Status changed to: Declined

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