Hi there,
In order to implement in one block something like the print function,
that accepts an unlimited number of arguments,
what kind of block should I define ?
I have experimented with a "print" block with only one input value and used arrays or linked lists as argument.
But I am facing difficulties because my UI must be close to the literal usage of the print function.
More precisely, the print block must be rendered inline, looking very similar to "print(foo, bar)" for example.
Then when dragging a new "string" block over it, the acceptable drop locations would be
- between '(' and "foo"
- between ',' and "bar"
- between "bar" and ')'
When dropped, the new block would be inserted accordingly in the list of arguments. The result would read one of
Where should I go to implement this drag and drop UI ?
(I am ready to extend blocky as far as it stands reasonable)
TIA
BTW "print" is just an example.