Dynamically populating dropdown input slots

10.2 is gonna be awesome. Just sayin'.

uhh ok. I have no Idea what it it is though - the past releases have been so great I cant imagine what could be next!

i already see a new block and have no idea how to use it.

Yeah, it'll have a help screen before the release. Still having the final details of the design worked out, though.

I know what it is, and I looked in the DEVLOG.md file (in the dev branch), so I know what is being added. I just don't know how to use it, and I'm really excited about it.

It'll be great to get dynamic interactive menus without having to use JavaScript :slight_smile:

Yeah we thought you'd like it!

How do I see the dev mode?

it's at https://snap.berkeley.edu/versions/dev

I think I've worked out how it currently works :slight_smile:

dynamicMenus_10_2_dev script pic (2)

dynamicMenus_10_2_dev script pic (1)
Peek 2024-11-01 16-49

Oh, I didn't think about dragging the when [ V] menu clicked :: control hat block into a block editor, since I'm conditioned to know that you can't drop hat blocks in the block editor. Neat!

I'm gonna actually have to update snapblocks to add this new block now...

You can also have submenus by reporting a list with lists as items, or you can have the displayed value be different from the menu item text (as in the POINT IN DIRECTION block) by making the list be 2D dictionaries, with the menu text as column 1 and the resulting values in column 2.

Now that Jens has allowed this, he's going to look into internal definitions for version 11. There's a lot to think about, e.g., how to indicate visually in the Block Editor if a script represents a subprocedure of a subprocedure, rather than a subprocedure of the main procedure.

Uh... they used all of that in their block.

Oh... I was up all night; I'm not really awake. Sorry!

Don't worry, I'm not very awake either (though I did get some sleep).

omg this is awesome Ik what I'm gonna be doing with this now, something ive wanted to do since 2022/2023

I just realized, this also means that we can finally have = in dropdowns without javascript!


Screenshot_20241101-122540

we couldn't do that before?

No, because = in custom dropdowns is used to make the displayed value be different from the menu item text, and there was no way to escape any of the special characters (which I think is stupid).

you cant put blocks in dopdowns T_T