Using backpack to copy blocks from one Blockly node to another

I've just discovered that the Blocky node has a backpack facility

Backpacks are used in block coding environments to stash commonly used scripts and then reused in other projects.

I hadn't realised it was available in NR Blockly and therefore it can be used as workaround fom the in-ablilty to copy/paste blocks between nodes

To enable it - go into your config (or create one if not already got one)

image

Then to use it to copy something like a complicated function

BackpackSmall

2 Likes

I had especially developed that feature for you two years ago, as a christmas gift. What a shame you only discovered it now...

Merry Christmas Simon :christmas_tree: :gift: :champagne:

2 Likes

Thank you

Now if you could implement the copy/paste plugin for this Christmas , I'd be even more grateful

You know from experience that I am always very busy during the Christmas period...
But you are lucky, that I have holiday today and this was very easy to implement :champagne:

See demo how to copy paste blocks between separate blockly nodes:

blockly_copy_paste

Please install the "copy-paste" branch:

npm install bartbutenaers/node-red-contrib-blockly#copy-paste

Also a Happy Christmas for this year :christmas_tree: :gift: :champagne:

P.S. Now quickly back to my wife her TODO list :shushing_face:

1 Like

Thank you very much :slight_smile:

But that means I just wasted my whole morning on the backpack documentation!

Took me 5 attempts to get the gif down to <4MB! :slight_smile:

PS See github issue I raised today while your about :slight_smile:

1 Like

Unfortunately, clicking on expand button causes an error
image

Oeps, please contact the head of the QA department of the blockly node for fast support.

Meanwhile I have registered an issue. Hopefully they can offer soon a dispose function to cleanup.

1 Like

@cymplecy,
I have added a temporary fix on the copy-paste branch.
In the Blockly issue I have also shared my code, which needs to be implemented in the plugin as a dispose function. As soon as the Blockly team has released that, all our plugins have a dispose function and we are done. To be continued...

1 Like

Works now thank you :slight_smile:

1 Like

For anybody following this discussion.
I have created a pull request to add a dispose function to the Blockly copy-paste plugin.

1 Like