jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.49k stars 744 forks source link

Blocks Not Updating Across UI #1773

Open maryfries opened 7 years ago

maryfries commented 7 years ago

Here, I was using my CONTACT constructor within the Block Editor (I was just testing my code—hence the script variable). I edited the last input for the block (either from 3 menus to 1 string or vis versa—I forget; I kept switching back and forth until we gave up on this part of the project for now).

Here you can see that the CONTACT block updated in one place and not the other. In this image, I suspect that the CONTACT block in the Block Editor is up to date and the one in scripting area is not, but I'm not 100% sure.

image

jmoenig commented 7 years ago

Usually when this happens to me it turns out that there are two different blocks, for example one could be global and the other local, or two different local blocks for different objects. Another source of trouble can be when you somehow end up with two sprites sharing the same name.

maryfries commented 7 years ago

I don't think either was the case, though I have too many copies of this project to check and say for sure.

Is there such thing as a local block in Snap? How are those created?

brianharvey commented 7 years ago

Is there such thing as a local block in Snap? How are those created?

Sprite-local, not script-local. When making the block you click "for this sprite only." We are using this in the latest iteration of the TTT project in U3.

Script-local blocks are on our short list for post-4.1 development.

maryfries commented 7 years ago

Ah, ok. I definitely wasn't doing that. ;)