Does anyone know of a way i can convert XML code to blocks
javascript
if there was a [scratchblocks] [xml v] of list :: list reporter[/scratchblocks] block, it would be easier
if this converts it to xml. there should be a way to convert
to a block
but i guess to save data in it u need js. but i dont mind js
That's not XML, that occurs when you try to convert a block to text, which will be a something.
It's possible to make an XML-to-block converter, but that is very complicated.
if snap! does it shouldnt there be someway to access that from within the project
Technically you can actually use the primitive
block to load xml.
It just doesn't return the imported blocks.
what does it do
It places the given XML to the current sprite, replacing all the scripts in a sprite.
doesnt even place the xml
is there a way i can make it into a list instead of replacing everything
You can, create a sprite named "Script Importer", then do the following code on anywhere other than "Script Importer":
huh
the primitive isnt working
nevermind got it
i already finished the code but i had to use js bc that doesn't save all the data from the blocks
With
you may get the XML as part of the "data"
Proof of concept :clone scripts
Every edit, to the "Shared" sprite script, is replicated to the "Shared.clone".
Remarks:
- the "syn_script" primitive does not handle the "snap" operation, i.e., appending a block to the stack of blocks.
- every record of the "when..." hat is stored in the debug "log".
thats sick so can you just do that across mqtt
Oops! that's a bug, thanks for letting me know, @dardoro. Fixing this in dev (later today), sorry!