Scratch-blocks checkbox next to variable

32 views
Skip to first unread message

Philip Ly

unread,
Jun 24, 2024, 8:19:07 PM (5 days ago) Jun 24
to Blockly
Hello Blockly team!

Is anyone familiar with any documentation for using the checkbox next to a variable. We also want to use it to show/hide variable values while our code is evaluating.

Thanks!

Christopher Allen

unread,
Jun 25, 2024, 4:12:17 AM (5 days ago) Jun 25
to blo...@googlegroups.com
Hi Philip,

Is anyone familiar with any documentation for using the checkbox next to a variable. We also want to use it to show/hide variable values while our code is evaluating.

I was unaware of this feature of Scratch until you mentioned it.  This is not a standard Blockly feature, as Blockly only supports adding blocks and buttons to the toolbox, but is something that Scratch has added to their "Scratch Blocks" fork of Blockly.

We no longer recommend forking (modifying Blockly itself) to add features like this, but it should be reasonably straightforward to do something similar in the form of a plugin like the existing Continuous Toolbox plugin (which does not support checkboxes but does demonstrate how to replace the built-in toolbox with one with extra features).

Alternatively, if you're not in a hurry you could wait and let us do much of this work for you: it happens that some of my Blockly team colleagues are in fact working on unforking Scratch Blocks—that is to say, rewriting it  to use the current mainline version of Blockly, with all of its extra features (like checkboxes in the toolbox) implemented as plugins.  I don't know what the timeline on that work is, but it will eventually result in the publication of a new version of Scratch Blocks with this checkbox feature provided plugin-style (though probably not as a neatly packaged, separately published plugin like the one mentioned above).


Best wishes,

Christopher

Philip Ly

unread,
Jun 25, 2024, 2:03:42 PM (4 days ago) Jun 25
to Blockly
Thanks Christopher! It was nice meeting you at the summit!

Appreciate your response. Yeah we're already on the scratch-blocks fork so we'll be working on unforking eventually. I think i figured out how it works and doesn't require any modification on our scratchblocks code. I'm looking forward to seeing how scratchblocks unforks as well!

Reply all
Reply to author
Forward
0 new messages