Edit: Split off from "Dropdown menus via list variables."
Awesome, thank you!
My application is in the Colors and Crayons library, where I have these two blocks:
I'd really like to combine them, so "crayon" would be one more option in the block on the left, but still get the dropdown menu for the second input when you choose crayon for the first one. And also have a different dropdown menu for color numbers that would only have relatively few entries, e.g.,
20 spectral red
25 darkest red
30 saddle brown
35 darkest brown
40 spectral orange
The reason this matters is that libraries don't include variables, but only procedures. The Colors library, the first time you use one of its blocks, uses the Variables library to make a bunch of global variables (which someday will use some different mechanism so as not to risk collision with the user's variable names). But that happens once the script is running, too late to look inside global variables to get the specification for the dropdown.
So I'd sort of like to drop a list on that second (variable name) input, except that including large-ish lists in the definition of a block makes it take forever to load, save, or edit the block. So I guess what I really need is to be able to put a JSON text in that slot, and have you convert it to a list dynamically. The JSON-to-list conversion is of course already in the Snap! source code. And I guess putting a list in the variable slot should work too.
Does that sound plausible? Thanks.