So, this is partially a continuation of this thread I made last year on request, and I would like to think this part of Snap! has been worked on further at least a little bit since then.
One request I had even was "sort of" implemented with the addition of the primitive block and being able to edit primitives - custom blocks with flat ends (i.e. you can't add more blocks after it, like the report block and the stop block) so that's cool.
For a few other things I suggested there may be a way or another around this stuff.
In my project I created basically a custom parser block that makes a couple changes to the text code that is output from codified blocks to mitigate some of the limitations.
One limitation (that I could say is still a suggestion that perhaps should be looked into) is items from custom dropdown menus - I have a simple "increment/decrement" block that is supposed to equate to a variable++
or a variable--
depending on what is chosen. You CAN type in the options dialogue something like increment=++
and decrement=--
which will then work, but then visually after selecting "increment" on the block, it changes to "++" which - so the suggestion is to simply have the option to have x=y
dropdown options visually display x upon selection even if the actual value is y.
To mitigate this for now, the parser block that I created basically searches for any script line ending in increment;
or decrement;
changing them to ++;
or --;
accordingly.
But now the main issue of the thread that I believe is the more important one, one that I'm sure there is a way to mitigate but I haven't thought of a way yet. It's about some of the blocks that use the separator/delimiter options now. Mainly the operators like x+y, x*y, x = y, x > y, x < y, x and y, & x or y - they all have the arrow that you click to add another entry, which is great, but... in codification there is no (at least not yet) "per-block delimiter" so if my set delimiter is a comma ,
using an x+y block will result in something like 1,1
.
I've been trying to get around it with things like the strings library + replace, and even using the codification blocks themselves - I think there might be a way I can change what the delimiter is depending on the block, but I'm really not sure how. Any ideas?
If anyone wants to check out what I'm working on that uses this, it's here:
https://lu9.st/SnapGML