User | Kudos |
---|---|
7 | |
6 | |
2 | |
2 | |
2 |
Using a ring control, it would be really nice if LabVIEW allowed the cases of a case structure to be defined by the ring contents, like an enum does rather than the ring value. It would be easy to force it to have a default case to handle values that aren't defined by strings in the ring. Just make sure you can still right click the case selector and tell it "add case for every value". This would be very helpful when creating code to handle exceptions that return values in a ring and you want to handle each case. It would be much quicker and less error prone than manually adding each numeric case that's defined in the ring.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declined for reasons listed in response by AristosQueue:
"And what would happen when you change the strings in the ring to fix a spelling error? Or when the strings in the ring are programmatically changed while the code is running for localization? There's nothing in the type propagating these strings, so the Case Structure doesn't get updated and your code still runs but just stops working. It's really bad.
This is a frequently heard and frequently rejected request. Tying your user interface to your implementation code like this is extremely error prone, and LV R&D has repeatedly refused to admit it to LabVIEW."