Make moving (reordering) blocks inside a script less frustrating

It's like playing "Tower of Hanoi" :wink:

1 Like

Since cymplecy was so quick with the extract idea ( THANKS CYMPLECY), another GREAT feature I like in block IDE's is the "DISABLE BLOCK" feature in MIT App Inventor.
One R-click selects it in the menu and the block turns light grey / beige color and will not be executed in the stream that it is located. Another R-click and "ENABLE BLOCK" activates the block again.
Great debugging tool without messing up the order / sequence of blocks, which is my biggest gripe with long block sequences that are riddled with C-Blocks to boot.

3 Likes

This is a makeshift solution. The project adds "grab this" menu item as described by @cymplecy.
Sprite can be exported and dragged to any other project.
https://snap.berkeley.edu/snap/snap.html#present:Username=dardoro&ProjectName=userMenu.grabThis&editMode&noRun

2 Likes

Do you know about the keyboard editor? Reference Manual page 115.

ooh - very clever - I didn't know we could add a menu item from Snap! :slight_smile:

JFI - I just use the old Scratch method of a simple repeat loop 0/1 (or false/true) when I need to comment out some code

(I also sometimes use it break-up a script to let me easily switch different versions of a set of blocks in and out easily)

image

1 Like

Interesting. Why REPEAT and not IF? That seems more expressive of the intent to me.

Yes, I know about keyboard input, but one of the points of a visual editors like this is that kids don't have to type. (Besides, the keyboard input support could be improved too, but this is OT.)

Its quicker to just drag a repeat block out than use an if and have to add a predicate

Plus a repeat 0/1 block stands out as being a pure debugging construct

2 Likes

I have updated the Feature Request description. Instead of hovering and check boxes now it says:

But it could become much better, if Snap supported selecting multiple blocks. The context menu could have "Start selection", which after clicking allows you to select the other end of the consecutive blocks, then clicking that makes them all selected. Then, with "Move" all that could be moved at once. Selection also could work with other operations, like Delete, Duplicate, etc.

1 Like

+ 1,000,000,000,000 (In words: oh, where have you been when I needed your really quick way of commenting code out ;~) )

Thank you for sharing it now (or, as an old saying goes, 'better late than never').

1 Like

Thanks! I've implemented this feature for the upcoming v6.3 minor release. Instead of ctrl you'll be holding down the shift key to extract a single command block from within a stack. In addition there will be an "extract" option in the context menu.

That's awesome! How can we check inside Snap! What version is in effect?

If you look at the tab shape above the Snap! browser window it should say "Snap! 6.2.4 Build Your Own Blocks."

Alternatively, click on the Snap! logo at the top left corner of the window and choose "About" to see the version along with a lot of other info.