LabVIEW Idea Exchange

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

Allow a Refnum as a Case Selector

I do this a lot:

ref1.png

I'd rather do this:

ref2.png

"If you weren't supposed to push it, it wouldn't be a button."
4 Comments
AristosQueue (NI)
NI Employee (retired)

I would strongly oppose this change on the grounds that it would make the very dangerous "Not A Refnum?" test harder to find in an application. Here's my post on the subject:

https://lavag.org/topic/15546-are-you-misusing-the-not-a-refnum-function-and-putting-your-app-at-ris...

 

If you are writing code like what is shown above, I am very worried about your application's correctness. I would advise you to rewrite your application to avoid that pattern. See the post on LAVA for details.

AristosQueue (NI)
NI Employee (retired)

> "If you weren't supposed to push it, it wouldn't be a button." 

 

Untrue, as demonstrated by the existence of the "Not a refnum?" primitive. 🙂

AristosQueue (NI)
NI Employee (retired)
Christina_R
Active Participant
Status changed to: Duplicate

Duplicate of https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Allow-References-to-be-Wired-into-Case-Selectors-to-C...


Christina Rogers
Principal Product Owner, LabVIEW R&D