# Node-red-contrib-blockly 1.1.0 released

**URL:** <https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241>\
**Category:** Share Your Nodes\
**Created:** [18 September 2018 15:19 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241 "2018-09-18T15:19:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 September 2018 15:19 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241/1 "2018-09-18T15:19:46Z")

</div>

Hi folks,

Mister Blockly (alias @cymplecy) has granted me permission to publish version **1.1.0** on NPM.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/2ebc60b26da54f683a6b40e7aabb59fed08c5c07.png)

For those not following all our discussions, here is a summary of all functionality that has been added:

- A new **timestamp block** has been added, which generates a timestamp (as a number similar to the Inject node):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/14012da70768ef45e3bc671a43aff92903cfc99e.png)
- A new **date conversion block** has been added, which can extract various information from a timestamp:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5d24bedb90a8cb1101cc9f6edbaac19e41899dd8.png)
- **Copy/paste** between separate blockly nodes is now possible. Restriction: only 1 block or (horizontal) chain of blocks can be copied. It is unfortunately not possible to copy a series of statement blocks at once.
- **Multi language** support has been added. Currently the blocks can be displayed in english, french, dutch, japanese. Thanks to @tilleul and @utaani for their translations!
- A new **comment block** has been added, to generate Javascript comments:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/adc7ba7ff0e6ef98018744956a7463f6932708f7.png)
- A new **Javascript block** has been added, in case no blocks are available for the required functionality:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5045da8dcb5ce1a145e89fb62cff889854e9a280.png)  
Caution: try to avoid using this block as much as possible, since this doesn't really fit into the philosophy of Blockly ...
- Fix for getting **'keys'** for normal Javascript objects (i.e. non Node-RED memory)
- Support for **nested properties** in both object-set block and object-get blocks, using the dot-notation:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c47e56e57e3928b90847a8b0dd20a07b03f98f2e.png)
- A new ' **has property**' option has been added to the object-get block, to check whether a specified property exists in an object (or in flow/global/node memory):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/485531ece8956518963378949aab2363b2f13087.png)
- A new ' **remove property**' option has been added to the object-get block, to remove a specified property from an object (or from flow/global/node memory):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/015f01b90ac1525b65902bf2053538e13f5ef0ff.png)
- A warning icon is displayed on the property-get block, if the input is not a string literal (but e.g. a variable). This indicates that nested properties are not allowed in this case.

Have fun !  
We will continue discussing here bugs or new feature requests ...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [18 September 2018 16:28 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241/2 "2018-09-18T16:28:48Z")

</div>

My additions to Bart's notes

> [@BartButenaers](#):
>
> **Copy/paste** between separate blockly nodes is now possible. Restriction: only 1 block or (horizontal) chain of blocks can be copied. It is unfortunately not possible to copy a series of statement blocks at once.

My workaround is to surround the wanted blocks in a while loop - then do the CTRL-C, restore original code and then past with CTRL-V where I want to

> [@BartButenaers](#):
>
> Caution: try to avoid using this block as much as possible, since this doesn't really fit into the philosophy of Blockly ...

+1000 🙂  
(But I've used it myself!)

> [@BartButenaers](#):
>
> Support for **nested properties** in both object-set block and object-get blocks, using the dot-notation:

But note a limitation that you can't use a variable for the property value if it has dots in it  
But you can actually put one get inside another get if needed

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bf19e1c709ddcdb17320a202fcd802ebd559d904.png)

This is intended to be "long-term" (until Christmas ) release so don't wait around for new features to appear - try it out now 🙂  
Simon

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [12 December 2019 10:10 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241/3 "2019-12-12T10:10:27Z")

</div>

Since Christmas is coming, I thought I'd make a small request 🙂

Now that we have persistent context storage, its easy to make useful nodes that retain values but there's always the problem of when they are copied and re-used elsewhere - all context values are lost.

So the node needs to have initialisation code to set them to sensible values

I used to use a compicated if statement to check if context exists but decided to try and use the well used equivalent of

`context.set('value', (context.get('value') || 0))`

but it won't let me stick a 0 in the slot

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cb3bcb4cbabb837d561b84ce1df37f05d42f7b0c.png)

so I have to do

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/52be352eb46aef687811ad710e6333e31a9fb0cd.png)

Just something to consider for the fabled 1.2.0 release 🙂

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 December 2019 13:59 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241/4 "2019-12-12T13:59:23Z")

</div>

> [@cymplecy](#):
>
> Since Christmas is coming, I thought I'd make a small request

Oh no, now I'm going to relate Christmas to Mister Blockly. That won't be fun anymore 🤣

So you want the OR-block to accept the zero? If so I will have a look at it. But it is a non-custom block, so not sure I can workaround it...

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [12 December 2019 14:39 UTC](https://discourse.nodered.org/t/node-red-contrib-blockly-1-1-0-released/3241/5 "2019-12-12T14:39:09Z")

</div>

> [@BartButenaers](#):
>
> But it is a non-custom block, so not sure I can workaround it...

Well - what we really should have is a simple to use initialise block that does the work for us 🙂

e.g  
`initialise [context dropdown menu] [property] [value]`

or maybe call it default?  
`default [context dropdown menu] [property] to [value]`
