# \[ANNOUNCE\] Visual programming a function node with Blockly - Feedback request

**URL:** <https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566>\
**Category:** Share Your Nodes\
**Created:** [13 July 2018 22:33 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566 "2018-07-13T22:33:30Z")\
**Posts on this page:** 20\
**Page:** 4

<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:** [30 July 2018 15:42 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/61 "2018-07-30T15:42:34Z")

</div>

So I deleted the node-red-contrib-blockly folder, restarted NR, F5 - no blockly node

cleaned cache and re-installed - got this  
C:\Users\Simon.node-red\>npm cache clean --force  
npm WARN using --force I sure hope you know what you are doing.

```
C:\Users\Simon\.node-red>npm install bartbutenaers/node-red-contrib-blockly

> fs-ext@0.5.0 install C:\Users\Simon\.node-red\node_modules\fs-ext
> node-gyp configure build

C:\Users\Simon\.node-red\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(108): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(153): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(1568): note: see declaration of 'Nan::Callback::Call'
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(297): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(339): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(375): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(433): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\Simon\.node-red\node_modules\fs-ext
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 (node_modules\fs-ext):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 install: `node-gyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red-contrib-blockly@0.0.1
added 1 package and removed 1 package in 23.856s

```

restart NR -F5 in browser - Blockly block available again but still looks like the old version

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

Could you try updating you version number to 0.0.2 to see if it helps kick my install to getting a newer version?

---

<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:** [30 July 2018 17:20 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/62 "2018-07-30T17:20:17Z")

</div>

Thanks for trying - has made no difference my send block still has send msg on it ☹

```
C:\Users\Simon\.node-red\node_modules\fs-ext>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" configure build )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  fs-ext.cc
  win_delay_load_hook.cc
..\fs-ext.cc(108): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(153): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(1568): note: see declaration of 'Nan::Callback::Call'
..\fs-ext.cc(195): error C3861: 'fcntl': identifier not found [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(297): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(339): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(374): error C3861: 'fcntl': identifier not found [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
..\fs-ext.cc(375): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
..\fs-ext.cc(433): warning C4996: 'Nan::NanErrnoException': was declared deprecated [C:\Users\Simon\.node-red\node_modules\fs-ext\build\fs-ext.vcxproj]
  C:\Users\Simon\.node-red\node_modules\nan\nan.h(887): note: see declaration of 'Nan::NanErrnoException'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\Simon\.node-red\node_modules\fs-ext
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 (node_modules\fs-ext):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs-ext@0.5.0 install: `node-gyp configure build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red-contrib-blockly@0.0.2
added 1 package and removed 1 package in 15.483s
```

---

<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:** [30 July 2018 17:24 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/63 "2018-07-30T17:24:26Z")

</div>

Just installed Node-RED on a new Pi install - all seems fine on that one

```
pi@s27Jun18:~/.node-red $ npm install bartbutenaers/node-red-contrib-blockly
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-contrib-blockly@0.0.2
added 1 package in 24.53s

```

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

---

<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:** [30 July 2018 19:03 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/64 "2018-07-30T19:03:29Z")

</div>

So ignoring my deployment issues on Windows - its all working fine on a Pi

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

I had to change the algorithm as there is no "return" block so the JS codes ended up as

```
if ((context.get('gate')) != false) {
  context.set('gate', true);
}
if ((msg['topic']) == 'gate') {
  context.set('gate', (msg['payload']));
} else if ((context.get('gate')) == true) {
  node.send([msg]);
}

```

At the end of the day - not using the "return msg" concept is work-around-able but I think it would be nice to have that option (either instead of or as well as send) as its the method most promoted in Node-RED examples that I've seen

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:** [30 July 2018 19:35 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/65 "2018-07-30T19:35:17Z")

</div>

One thing I noticed is that in my orignal JS I used `context.get('gate')` but the Blockly syntax says `node memory`

I think the Blockly syntax should follow standard Node-RED ways of describing operations wherever possible

e.g

`get context/flow/global value of property "gate"`

type of syntax

(I actually think the having `node` instead of `context` is better terminology but I'd stick with current concepts wherever possible)

---

<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:** [30 July 2018 20:30 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/66 "2018-07-30T20:30:28Z")

</div>

JFI - I tried updating Blockly node on my other Node-RED install running on my Windows PC

I don't get all the error messages but it didn't update the block to just `send` - still says `send msg`

```
c:\newnodered\node-red>npm install bartbutenaers/node-red-contrib-blockly
npm WARN node-red-node-test-helper@0.1.8 requires a peer of node-red@~0.18.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ node-red-contrib-blockly@0.0.2
updated 1 package in 54.566s
```

---

<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:** [1 August 2018 12:20 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/68 "2018-08-01T12:20:40Z")

</div>

Tried converting another of my functions (takes 6 digit hex RBG colour and converts to a 9digit decimal version)

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

100% success 🙂

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

---

<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:** [1 August 2018 12:31 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/69 "2018-08-01T12:31:03Z")

</div>

[REQUEST]  
Can the pink `get (and set) property payload of object` blocks have `msg` object as a default value?

---

<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:** [1 August 2018 16:57 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/70 "2018-08-01T16:57:48Z")

</div>

Found another function and re-did in in Blockly  
(It parses cheerlight tweets and extracts any colours present in the text and outputs a series of those colours in the order they appear)

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

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

---

<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:** [2 August 2018 09:04 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/71 "2018-08-02T09:04:15Z")

</div>

> [@cymplecy](#):
>
> [REQUEST]  
> Can the pink `get (and set) property payload of object` blocks have `msg` object as a default value?

And if we can have defaults, could we have `msg` as default object on the send block as well please

---

<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:** [2 August 2018 12:34 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/72 "2018-08-02T12:34:46Z")

</div>

OK - tried out replacing a simple JSONata expression from a change node

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

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

Obviously the JSONata is much shorter but with Blocky I don't have to remember that I have to use & and not + to concatenate and remember that they are differences between accessing msg object properties and flow context values

---

<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:** [3 August 2018 12:55 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/73 "2018-08-03T12:55:38Z")

</div>

I have found one function that I don't think I can use Blockly for

```
var msglength = msg.payload.length;
var msgbuff = new Buffer(msg.payload, "utf-8")
var outbuff = new Buffer(4 + msglength);
//msg.payload = buff.write("Happy birthday! ", "utf-8");
msgbuff.copy(outbuff,4);
outbuff[3] = msglength;
msg.payload = outbuff;
return msg;

```

Its used to convert a string payload into a Scratch Remote Sensor Connection format to send messages between Node-RED and Scratch 1.4

(Not a real problem as Blockly cannot be expected to cope with all scenarios)

---

<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:** [3 August 2018 13:46 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/74 "2018-08-03T13:46:27Z")

</div>

Hi Simon,  
could you please describe with a bit more detail which part of the code cannot be converted to Blockly (since I have no pc at my disposal currently)? Is it perhaps the (NodeJs) **Buffer** part???

Thanks!!

Bart

---

<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:** [3 August 2018 14:09 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/75 "2018-08-03T14:09:50Z")

</div>

Yes - the buffer bit (maybe it can be done but I don't know how)

---

<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:** [3 August 2018 21:13 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/76 "2018-08-03T21:13:59Z")

</div>

Had a quick look, but I don't think anybody has ever build Blockly blocks for _ **Buffer** _ support. Moreover the [NodeJs API](https://nodejs.org/api/index.html) is quite extensive, so it would be quite a job to implement the whole API...

Anyway the function node will always be the big brother of the blockly node, offering much more functionality. Perhaps others can create pull requests afterwards to extend the toolbox with extra blocks. I could add a quick intro on my Github repository, about creating new blocks...

In version 0.0.2 I will offer some basic Buffer functionality, since I think that is used quite a lot in Node-RED.

Bart

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 August 2018 21:38 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/77 "2018-08-03T21:38:46Z")

</div>

If that use case of buffer is an interface to blockly 1.4 then that could be a specific block which would mean fewer options

---

<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:** [3 August 2018 21:58 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/78 "2018-08-03T21:58:50Z")

</div>

Hi Dave (@dceejay) ,  
think my brain has (hopefully partially) melted because of the heat. Could you please give some more details, because I'm not quite sure what you mean...  
Enjoy (the remainder of) your holiday!!  
Bart

---

<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:** [4 August 2018 08:40 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/79 "2018-08-04T08:40:34Z")

</div>

I was only posting that I'd only found one of my exisiting function nodes that I couldn't replace with a Blockly node

I don't need/want/expect Blocky to do 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:** [4 August 2018 09:05 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/80 "2018-08-04T09:05:50Z")

</div>

> [@dceejay](#):
>
> If that use case of buffer is an interface to blockly 1.4

Its a node to convert text to Scratch 1.4 broadcast message format - an experiment of mine to link Node-RED to Scratch

---

<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:** [4 August 2018 16:47 UTC](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566/81 "2018-08-04T16:47:58Z")

</div>

Simon,  
to be honest I was so focussed on  
Javascript objects (and Json), that I completly forgot about NodeJs buffers. Buffers are widely used in Node-red, e.g. to represent images. So I just need to support them in version 0.0.2. Will make some prototype blocks in the next weeks, and discuss them here ...  
Good that you have noticed this during your tests!!!  
Bart

[Previous page](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566.md?page=3)

[Next page](https://discourse.nodered.org/t/announce-visual-programming-a-function-node-with-blockly-feedback-request/1566.md?page=5)
