<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Editing Custom Blocks Problem]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am working on a set of custom blocks that can be used to control a Robosapien and have come across a problem in editing custom blocks.</p>
<p dir="auto">I create my custom blocks in the online block maker and then download the .m5b file. My blocks are all 'Execute' type. When I open the .m5b file in UIFlow the blocks appear and can be used quite happily.</p>
<p dir="auto">I wanted to add some more blocks so I went to the Block Maker and loaded in my original .mb5 file. I noticed that the block statements had changed in that the    "previousStatement": null,    "nextStatement": null was missing from all but one of the blocks. Also the blocks label type had been changed from "field_label" to "label" and a new 'name' attribute had been added in args. Obviously, if you download this file then all your blocks are now broken in UIFlow.</p>
<p dir="auto">However, the Block Maker interface appeared to have all the original information for each block. So it I click on each block in turn the code is regenerated correctly. It seems that when reading in the .m5b file into Block Maker something is going wrong.</p>
<p dir="auto"><strong>As an example here is the original code that works in UIFlow.</strong></p>
<p dir="auto">// Block __Robosapien_Forward<br />
var __Robosapien_Forward_json = {<br />
"previousStatement": null,<br />
"nextStatement": null,<br />
"message0": "%1",<br />
"args0": [<br />
{<br />
"type": "field_label",<br />
"text": "Forward"<br />
}<br />
],<br />
"colour": "#eb94e5"<br />
};</p>
<p dir="auto">window['Blockly'].Blocks['__Robosapien_Forward'] = {<br />
init: function() {<br />
this.jsonInit(__Robosapien_Forward_json);<br />
}<br />
};</p>
<p dir="auto">window['Blockly'].Python['__Robosapien_Forward'] = function(block) {<br />
return <code>espnow.send(id=1, data=str(101))</code> + "\n";<br />
};</p>
<p dir="auto"><strong>Here is the same block's code immediately after the .m5b file is re-opened in Block Maker</strong></p>
<p dir="auto">// Block __Robosapien_Forward<br />
var __Robosapien_Forward_json = {<br />
"args0": [<br />
{<br />
"type": "label",<br />
"text": "Forward",<br />
"name": "Forward"<br />
}<br />
],<br />
"message0": "%1",<br />
"colour": "#eb94e5"<br />
};</p>
<p dir="auto">window['Blockly'].Blocks['__Robosapien_Forward'] = {<br />
init: function() {<br />
this.jsonInit(__Robosapien_Forward_json);<br />
}<br />
};</p>
<p dir="auto">window['Blockly'].Python['__Robosapien_Forward'] = function(block) {<br />
return <code>espnow.send(id=1, data=str(101))</code> + "\n";<br />
};</p>
<p dir="auto"><strong>Thank you for all the hard work you put in to developing these tools .</strong></p>
]]></description><link>https://community.m5stack.com/topic/2206/editing-custom-blocks-problem</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 22:16:40 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2206.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Aug 2020 17:31:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Editing Custom Blocks Problem on Thu, 14 Jan 2021 08:33:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gaviota" aria-label="Profile: gaviota">@<bdi>gaviota</bdi></a> I confirm that I found the problem you described also on the on-line version 1.7.0 of UIFlow. Thanks to your trick (click on each block again in Black-Maker will fix the proper rendering once imported into UIFlow) I was able to rescue.</p>
]]></description><link>https://community.m5stack.com/post/11742</link><guid isPermaLink="true">https://community.m5stack.com/post/11742</guid><dc:creator><![CDATA[teiafra]]></dc:creator><pubDate>Thu, 14 Jan 2021 08:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to Editing Custom Blocks Problem on Sun, 16 Aug 2020 08:15:40 GMT]]></title><description><![CDATA[<p dir="auto">This problem i realized with the desktop version of UIFlow, therefore i used only the online version.</p>
]]></description><link>https://community.m5stack.com/post/9667</link><guid isPermaLink="true">https://community.m5stack.com/post/9667</guid><dc:creator><![CDATA[Gaviota]]></dc:creator><pubDate>Sun, 16 Aug 2020 08:15:40 GMT</pubDate></item></channel></rss>