Dropdowns from db?

any progress?

working on it

okay...

https://snap.berkeley.edu/snap/snap.html#present:Username=helicoptur&ProjectName=database%20dropdown
here you go, hope it works

thanks :smiley:

its not working

hey sorry i missed you i never got any notification. anyways im guessing (by customPrimitives) you want to save / load modified blocks?

no no not that

anyways ima go to bed

can you please explain what's not working and give details?

image
image

im a bit confused on what you mean with your example

but i could probably get a menu to save to local storage, with a couple blocks

add (option) to (menu)

delete (option) from (menu)

where the menu slot would be a dropdown to either select the main top menu or a submenu. then you could save whatever you want if it's a string value, or add submenus. if you want to save something that's not a string value you'd have to convert to/from a string which I could maybe help you with if I knew what you were trying to save

What..?

what are you trying to save to local storage? why can it not just be saved to the project?

Does it really matter??

yes because you can only save string values to local storage, you know text, so if you wanted something like the contents of a drop-down menu saved, you'd have to convert it to text to save it and convert it back to load it. which would be very easy if it were just a single list of options. if you wanted submenus then it'd be a little more complicated but not much. if your menu options are anything but text (ie an object) it'd need to be converted to/from text too, which may be doable depending on what it is you're trying to save. and if you ever want to add/remove options from the menu you'd probably want something that does it for you so that you didn't have to dig through the code yourself.

if it was something that could just be saved to the project itself it's be a lot more practical to just do that. that's why i ask.

No no no

Change of plans, the menu is going to be in a json list which is a stored key in your browser, the key being customPrimitives, and i want it to split the list by json and all of the things in that list is the menu

That's a much better idea, since it's so much easier to parse json (all because it's built into js)

okay, can you make it?