03-10-2011 05:46 PM
I am really getting frustrated. I know I have used slider controls wired to case selectors before and it acted like an enum. I could add cases for every value, etc. But now I am missing something and can not figure out how to do this. When I wire the slider to a case structure it acts like an integer is wired to the selector. I tried changing it to a typedef and that didn't work (I didn't expect it would)
Here are the steps:
I noticed this is a type DBL so I changed that to a U16.
When I wire it to a case selector it does not behave like an enum. This is killing me because I know I have done this before. I am glad this is frustrating me on my CLD practice exam instead of the real thing!
I can right click on the control and create a constant. It creates a thing that looks like an enum with all the items that I added.
03-10-2011 07:44 PM
I have come to the conclusion that I was imagining things. Maybe this is something for the idea exchange?
03-11-2011 10:16 AM
Hello Steve!
Have you resolved your own issue? Is there no longer a problem? Please respond because I'd be happy to look into this for you.
All the best on the CLD exam! Maybe CLA one day?
Greg S.
03-11-2011 12:36 PM
you can make an enum, use the enum to populate your slider and typecast the slider to the enum.
The slider acts as the user interface for the enum. This way you dont have to update 2 controls and can have the best from the enums advantages.
03-11-2011 01:28 PM
@Greg S wrote:
Hello Steve!
Have you resolved your own issue? Is there no longer a problem? Please respond because I'd be happy to look into this for you.
All the best on the CLD exam! Maybe CLA one day?
Greg S.
The only resolution is that I think I must have been imagining things.
It has been a long time since I have used any sliders or knobs with text labels. But I seem to recall that if you select text labels and add some items then you could wire the slider to a case structure and select based on the labels just like an enum. Maybe not. I know that if you create a constant from the slider you edit it the same way as an enum constant - it shows the labels. Maybe that is why I thought you could just wire it directly to a case structure.
Thanks.