Hiding blocks programmatically rises an error in Snap! 7

Hiding and showing blocks programmatically as shown in the Snap! manual page 17 (bottom) rises an error in Snap! 7.0.2 (Type Error: Cannote read properties of undefined (reading 'FlushBlocksCache'). In version 6.9.2 it works fine.

You can only have a variable with a string name, so of course it's gonna throw an error if you put in a block (with a few exceptions)

Edit: from the manual


I'm gonna look into it a bit more

Hide variable is for hiding a variable watcher on the stage. The block move (10) steps is not a variable so you got an error...

Edit: (after reading the manual)I will test it with an older version of snap.

in 6.5.0 i got this:
image

Oh! it work in 6.9.2 !

It's a bug or Jen's discard this functionality...

Huh, still throws an error while using the script builder library

Did you try with the primitive hide variable block?

Edit: It actually does work in Snap 6.9

Why do you want to hide bloc programmatically ?

Yes, this is a bug in 7.

Why a block named hide variable hide blocks ?

(Always read small letters at the bottom of the page !)

Basically because Jens has a fixation on reducing the number of blocks in Snap!, so (almost always, with a few exceptions such as the sound blocks) he prefers to recycle an existing block for a new purpose rather than add a new HIDE BLOCK block.

And we're a little embarrassed, I guess, about giving in to pressure from teachers about hiding things. :~)

but why do you want to hide block programmatically instead of right click on the block ?

if you hide a block and save a project, the hidding block is saved with the project...

You're a curriculum developer and you're setting up a learning environment with a very restricted set of blocks to work with. So you build into your code an initializer that does that.

Thank you

The option to hide a block when you right click it has been removed, instead you have to right click the pallet (not on any block), then click hide blocks, then you have to find the block you want to hide. Right now, the fastest way to hide a block is programmatically. I don't know why jens removed that option, it was really fast.

IANJ, but what teachers were asking for was a way to hide blocks wholesale, bunches at a time. I suppose he could have also kept the other way, but he likes to simplify the interface.

What does this stand for?

I am not Jens.

It's in the same family as "IANAL" for "I am not a lawyer."

thank you for the bug report, and thanks to @zakkolar for the fix! I've just released a patch (v7.0.3) that addresses this (and some other) issues. You may need to perform a "hard reload" (reload Snap! in the browser while keeping the shift key down) or to flush your browser cache in order for the changes to become active right away.

Thank you both very much.
Works as expected again!