Apologies for the possible duplicate question. I'm aware that there's lots of similar questions.
How do I programatically connect the blocks depicted in the diagram below? All of the blocks in the diagram are added to the workspace via `workspace.newBlock`.
Specifically, I'm having problem with input/output connections. I think I understand `next` and `previous` (the top and bottom notches/arrows in blocks) but I can't seem to get a block nested inside a statement input block. I've manually dragged the blocks by hand for the diagram but I'd like to do it with code instead.
Which connection type is connection 1?
Are connections 2 and 3 in the image the same type of connection? Which connection method do I use here? is it `Connection.previousConnection`?
Here are the workspace definitions for the blocks involved. I'm using `Blockly.defineBlocksWithJsonArray` to define them.
As you can see, none of them have types/checks or outputs. I'm at the clutching-at-straws stage so I've made all blocks 'connectable' with each other (at least, I've tried to).
Apologies for the lack of formatting:
```javascript
{
type: "block_field_contains",
message0: "field %1 contains text %2",
args0: [
{
type: "input_statement",
name: "synergy_field_identifier",
},
{
type: "input_value",
name: "TEXT",
}
],
previousStatement: null,
nextStatement: null,
colour: 230,
tooltip: "",
helpUrl: "",
output: null,
},
{
type: "with_name_block", // this block is nested inside the main 'C' block.
message0: "with name %1",
args0: [
{
type: "input_value",
name: "TEXT"
},
],
inputsInline: true,
previousStatement: null,
nextStatement: null,
colour: 230,
tooltip: "",
helpUrl: "",
output: null,
}
```
Both green 'blocks' are standard `TEXT` fields. I would like to keep the `with name` block a dummy input rather than a `text_input` block for flexibility.
Thank you in advance!