-
Notifications
You must be signed in to change notification settings - Fork 8
Description
So taking the neopixels as an example.
We currently have blocks, like the "clear", that are meant to only take "neopixel_object" type blocks as an input, to be used as an instance of the NeoPixel class, but due to the nature of the variable block you could attach any type of variable to this.
So you could set variable foo to 0 and then attach foo to the clear block to generate the equivalent of 0.clear().
Apart from that, even things like figuring out where the constructor block is meant to go is not very straightforward.
I was thinking if following the variables approach would be a better model for class instances? With or without the "create variable" button on the toolbox, but at least to have a way of creating instances (the previously mention button, or a block) and then blocks with a special dropdown that contains only the relevant instances.