Define block replaces upvar when ring glitches

This bug happened on my iPad while I didn’t have internet. (Safari) I put

(this [script v])

into

define ((block)) [block] (()$>)

and it glitched and made

define ((block)) [block] (this [script V])

I ran it and it produced this.

define ((this [script V] :: control)) [block] (this [script V])

I can’t reproduce this, so I don’t have a video.

Yeah, there was already a topic about this, although I don’t remember if it was resolved. I’m struggling to find the link but I swear it’s here somewhere, I think @d016 might have been in the topic?

also, the upvar block got forced out of the upvar slot??? and it still acted like an upvar

Yeah, I remember making a topic like that

found it

replicated it


untitled script pic (15)

it can also happen on accident.
A slight work around would be to type in a random sequence of characters and hope no one uses the variable name.
Each character needs to be entered in with some sort of alt code equivalent for the operating system or a copy paste trick.

I made the original post because it happened on accident. i didnt unringify it, i just dropped the this script in and it self-unringified

I tried to fix it but they said no

…Because you made an unsolicited PR with no context or clear explanation of testing.

I can’t reproduce this. Presumably this was a one-off glitch in your iPad. But it does suggest that this can happen accidentally. And if you’re not careful playing around with it, you can break things so much that you have to enter dev mode and manually delete the offending morphs to continue coding. From what I can tell, however, this has been at least partly fixed, as it only occurs if the name of the upvar is the same as the name of the block you are defining.

PS: You can make the “this script” be in the control category with :: in SnapBlocks (and the menu read-only via capital “V”).
define ((this [script V] :: control)) [block] (this [script V])
define ((this [script V] :: control)) [block] (this [script V])

ohhh i kept using single colons instead of double colons, so that’s why it didnt work

old

its not dev mode

you can put a for loop with an upvar named “block” in a define block and it happens

you can ringify the upvar with a this [script V] and move it out

dusty gif

recording

He was talking about removing the THIS SCRIPT upvar