Add inputs to a ring

I need a block that adds inputs to a ring.

I’m working on a solution right now. Have you tried joining blocks and inputs?

I have this right now, but it has unexpected issues if there are input names in the ring to be set.

Joining a ring removes its inputs, so you can do this:

Yeah, that AND it doesnt work when the ring is empty

Fixed by adding a special case for empty rings (I’ve done this before):

Maybe


?

this works will for command rings ({}@addInput)
but not for reporter or predicate rings (()@addInput) (<>@addInput)

I did not realize ([input names V] of [ V]) is in the Sensing category, out of anywhere else. How odd for it to be in there.

in the dev version, it becomes MUCH easier:

xml script building script pic (1)

careful with the “expression” selector in dev! That’s something we’re experimenting with in a very different context (that of writing helpscreens for Snap! in Snap! as Snap! projects), and I’m absolutely not decided on the benefits of this particular experiment.

oh! sorry.

That is really interesting.

@theaysnap, I noticed you marked @redgeographysnap’s block as the solution. Was there something that their block accomplished that my (simpler) one did not that was important to you? Just curious if there is something I missed.
The block in question:

Your block fails on stuff like this

While the block marked as the solution doesn’t

Thanks for letting me know! I wish there was a more elegant way to add inputs to a ring - although according to @sathvikrias the next update may give us just that!