Discuss Scratch

birbilis
Scratcher
93 posts

Can't rename an unnamed custom block

Please see
https://scratch.mit.edu/projects/315757224/

Inside unmap block I wanted to add an inline comment, so I decided to define a custom block that does nothing (nor a screen redraw) and just hosts a string parameter.

1) I initially named that dummy custom block as “Comment”, then “Note:”, and then I tried removing the name and it worked. Tried with more than one such unnamed custom blocks and it allowed more than one. Noticed it called different one depending on which one I used from the pallette (obviously it uses some internal id , but the user can't distinguish them in that case so probably should allow up to one such , unless you want to allow it for excercises like “guess which one is being used” in some code from a number of provided anonymous custom blocks)

2) After I have such an unnamed custom block I can't rename it anymore which is the more important issue (bug) there

* some extra notes:
3) I'd prefer if there was a yellowish “inline comment” block like that in the palette so that I can add inline comments in my code. Ideally it should show no name and show “Comment” or “Note” as tooltip in the palette (in the code it should show its content as tooltip with word-break in case it has some longer text

4) the existing way of comments isn't very useful when working on some code and gets in one's way when heavily refactoring it, esp. since comment nodes don't keep their relative position to the block their attached to when you move that one
xXRedTheCoderXx
Scratcher
1000+ posts

Can't rename an unnamed custom block

birbilis wrote:

Please see
https://scratch.mit.edu/projects/315757224/

Inside unmap block I wanted to add an inline comment, so I decided to define a custom block that does nothing (nor a screen redraw) and just hosts a string parameter.

1) I initially named that dummy custom block as “Comment”, then “Note:”, and then I tried removing the name and it worked. Tried with more than one such unnamed custom blocks and it allowed more than one. Noticed it called different one depending on which one I used from the pallette (obviously it uses some internal id , but the user can't distinguish them in that case so probably should allow up to one such , unless you want to allow it for excercises like “guess which one is being used” in some code from a number of provided anonymous custom blocks)

2) After I have such an unnamed custom block I can't rename it anymore which is the more important issue (bug) there

* some extra notes:
3) I'd prefer if there was a yellowish “inline comment” block like that in the palette so that I can add inline comments in my code. Ideally it should show no name and show “Comment” or “Note” as tooltip in the palette (in the code it should show its content as tooltip with word-break in case it has some longer text

4) the existing way of comments isn't very useful when working on some code and gets in one's way when heavily refactoring it, esp. since comment nodes don't keep their relative position to the block their attached to when you move that one

Okay! Just delete the text input and click on add a label! Happy to help!
birbilis
Scratcher
93 posts

Can't rename an unnamed custom block

Didn't try that, but it would remove all text where it was used in the code. However if adding and removing an extra param also works indeed it would a better alternative to removing and readding the unnamed custom block (since in that case you'd have to remove all uses first)

Powered by DjangoBB