Codification questions

Снимок экрана 2023-04-01 в 12.18.15

how can we make code mapping to blocks with multiple inputs like this?

so like if length is chosen it will give length code, if rank, rank code, and etc

AFAIK you'd have to go to great lengths to simulate all the options of the Snap! primitive length block and then write code to replace the Snap! block with all it's variants and then codify each of of those

thanks, but ngl, this looks complicated т-т

Grumble, did I mention lately that this is putting a strain on my patience yet?

To answer your question: Codification is not a tool that lets you turn arbitrary Snap! blocks and their user interface into arbitrary textual representation and their user interfaces. For drop-down menus it's either that your target codification handles those selectors (you know, you just dispatch on the input you get in that function, it's called ... programming). Alternatively - perhaps better, depending on your use case - you create custom blocks for the features you want your DSL to expose to the user, and then you codify those. Therefore, if you have a dropdown with semantic selectors, you create a custom block with its own codification for each selector you wish to expose.

Okay, does this answer your question to a degree where we now can go back to talking about Snap! and CSEd, and not obsess about these kind of questions?

i wont ask these questions anymore, sorry

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.