10-01-2024 11:43 AM
OK, so the position slider is a control and the code is supposed to detect it it has been moved out of the correct position for the step. Seems quite silly. 😄
10-04-2024 02:59 PM
The exact requirement is "When the user moves the Car Position Slider to the Exit position, all Car Wash Indicators should turn OFF and the Car Position Slider should reset to the Entry position". It's obvious that combining user & programmatic control can be a problem. Technically, the slider does reset to the Entry position, but it doesn't behave the way a user would expect. I don't think it satisfies the spirit of the requirement. And as Jeremy points out, even the provided solution has this defect. So how would one work around that quirk and satisfy the spirit of the requirement?
Jeremy found a partial solution by adding an arbitrary delay, but he's still left hoping the user releases the button fast enough. The only other easy solution I can think of is to wait for the mouse up event at the Exit position. This way you know the user is no longer interacting with it. Perhaps something like this.
10-07-2024 01:00 PM - edited 10-07-2024 01:03 PM
So I would disable the slider except for the state where the car be be moved to the exit.
I have no idea why you would use a "mouse-up" instead of a "value changed" event.
A transparent (fast timeout) inside a state is silly and you can get the newval (instead of reading it via value ref). Way too convoluted!