I have a piston that behaves differently based on the number of devices stored in a device variable. It wasn't behaving as expected so I made a "dummy" piston to run some experiments on the logic.
Turns out, the issue is a clear variable (or one set to 'nothing selected' or "") all result in a count of 1. I've tried everything I can think of to get this to work, but keep coming up blank. Appreciate any help (or other thoughts)
The images below behaves as expected when one or more devices are stored to it:
Of course... then I try it in my actual piston and it fails. Any idea what could be the issue here? Same Device variable as the other piston, and set to the same value...
It was the same as length()... 24 when empty in my dummy piston, but in my real one (that now has an error when trying "isEmpty()" shown above, size() returns a 0. Color me confused...
Here's the whole piston. I forgot if you post the piston in a message with multiple images, it doesn't zoom in when you click on it... it goes to the next image instead.