Help with my scratchblocks project

does anyone know how to debug the blockspec custom block?

The blockspec of block doesn't have to be so complicated.
You can just do:
[scratchblocks]
(block spec ((block)::sensing)::sensing)::events hat
report (call (JavaScript function [block] [return block.expression.blockSpec;]::operators)with inputs (block)::control)::control cap
[/scratchblocks]

i don't know what the bugs are supposed to be

dont worry @helicoptur fixed them

just need help with the scratchblocks script

There is a Shift menu "to scratchblocks..." https://snap.berkeley.edu/snap/snap.html#present:Username=dardoro&ProjectName=toScratchblocks
Based on this PR https://github.com/jmoenig/Snap/pull/1646

no there isn't

????

nope

If it's not that you are trying to achieve
toScratchblocks script pic (1)
then sorry to bother you...

I am

we can't put hat blocks in rings :~(

I made some progress!
image
Now it's pretty much done except I don't know how to get the category of a block.
Edit: Found out how to do that, though it requires javascript.

I see no way to reference the hat block other than by index in the scripts array of the spritetoScratchblocks script pic (3)

I need help with a block that reports blocks from scratchblocks code.
(if it is possible it requires JS since you can do things in scratchblocks that you can't do in :snap:)

anyone?

Scratchblocks parser can be build based on Tim Radvan & Co scratchblocks to SVG https://github.com/scratchblocks/scratchblocks.
It should be quite easy to get blockSpec list instead of SVG but there still will be a problem to create a real Snap! blocks.

Snap natively supports XML export and import so probably it's a better choice if You try to build something like a network shared backpack or coeditor.

not sure how to

This seems familiar...

EDIT: replaced scratchblocks with script pic

(btw, you should escape (, ), {, [, }, ], <, and >)

do you mind not using scratchblocks?
(just confusing)