Bool switch in custom block

Please fill out these questions for all feature requests and bug reports. If you're requesting a feature, please let us know why this feature is important or useful, not just what it should do.

  1. What browsers show this problem?
    Vivaldi (chrome bases on Win10) bug

When green - reports true
Click on it - goes red - reports false
Click again - goes blank - reports 0 (should go back to green and report true)


1 Like

Shift-click the Settings menu; the red options that appear are experimental. One of them is Ternary Boolean slots; is it checked?

1 Like

Thanks - it was

Seems strange that it was ticked - it would have been tricky for me to accidentally enable it!

I think that is the default.

Very strange to be a default :thinking:

Just tested opening Snap! in private window - It wasn't enabled, so probably not the default setting

It's not the default. (At least it isn't for me)

The reason this feature exists is that empty input slots have a special meaning in Snap!: they are filled by inputs to a HOF in which they're used. So if you mistakenly, or for debugging, set a fixed Boolean value in an input slot, it should be possible to undo that.

I'm surprised it's not the default; I'm pretty sure I remember that it used to be. But I've been wrong before. (The last time was in 1996.)

1 Like

ternary Boolean slots is off by default, mainly because robotics people use these switches as just that - switches - and got irritated by the third state.

Am I wrong that at one time it was on by default? (Just curious as to whether I'm losing my mind.)

you're right! But it wasn't "on" by default, because the feature to only toggle between two states outside of rings and the palette, but between three states inside of them didn't exist. So, the wording in the setting suggests that ternary is somehow a new feature, but in reality constraining it to just two is the new-ish one :slight_smile: