Saving/loading proj. w/ blocks w/ expandable inputs w/ >2 lines in "expand" menu

(edit 1: i’m pretty sure the problem was with the group... menu, not the expand... menu)
(edit 2: nvm i figured that wasnt the case)

Yea, that title is a little bit verbose. The full thing couldn’t even fit in the length limit, but I’ll try my best to explain this problem…
This might be because I’m using the groups feature incorrectly, but let me explain. So basically, I came across this when making my Snap*!* extension. I was making a switch-case reporter block like this, with expandable inputs:


(You can drag the block into your editor to load it and see how it’s made, by the way. It has 3 lines in the “expand…” menu.)
As you can see, it looks pretty normal, since the values to the right of the = signs are, in fact, there. However, if you save and then load the project, then the values to the right of the = signs are reset to their default values.

This also happens when there are 3, 4, etc. lines in the “expand…” menu, but not when there are only two. This also happens when you save/load custom blocks containing blocks like this in their definition (which is how I found this bug in the first place).

So yea, it would be pretty cool if you could fix this (I used a temporary fix for the extension I was making). I hope everything I explained was clear, and if it wasn’t, you may ask questions, and I’ll try my best to respond to them…

Long time no see!

I think there are bugs with serializing grouped inputs. Something similar happened to me before.

yes, this is a known bug, (I believe found by @blockpointstudios or @mark4sisb in their custom types topic), but i’m pretty sure the devs don’t care much about it, since jens isn’t the biggest fan of variadic input groups/expand as far as I know.

Unfortunately, slotting blocks into the slots on the right did not work either, since this glitches in extra inputs.

(switch []
case [a] = (a)
case [b] = (b)
@<:> ::control) // before reloading

(switch []
case [a] = [] (a) = []
case (b) @<:> ::control) // after reloading

(switch []
case [a] = []
case (a) = []
case (b) @<:> ::control) // after reloading again (the block remains like this)

Yea, this was what happened to me while making my extension. I had a switch-case block like this in my extension, and I used it in the definition of another block and it broke in this way.

So yea, thanks to all for clearing stuff up. If you have any other questions, let me know.