Scratch-gui: Implement variables "for this sprite"

Created on 23 Jul 2017  路  7Comments  路  Source: LLK/scratch-gui

Expected Behavior

  • When creating a variable there should be a way to indicate that it is "for all sprites" vs. "for this sprite"
feature request

Most helpful comment

so we can use this issue just to track the global/local variable feature request.

Well, then..

I think there should be some sort of separation between local and global variables, in the variable palette. In my Scratch mod, I did that, so, simple concept images:

Variable palette screenshot

Variable dropdown menu screenshot

In my own Scratch projects, I have to name variables "self.(name)" or "global.(name)" so that they're all grouped together by the alphabetical sorting:

Variable palette screenshot

It would be nice if they were automatically grouped together by the Scratch editor, instead.

All 7 comments

Thanks @Kenny2github. We now have a develop branch that is ahead of the master (stable) branch. You can find it https://llk.github.io/scratch-gui/develop/. The delete option is there in the dropdown
image

I'm going to edit the issue description a bit to reflect that, so we can use this issue just to track the global/local variable feature request.

so we can use this issue just to track the global/local variable feature request.

Well, then..

I think there should be some sort of separation between local and global variables, in the variable palette. In my Scratch mod, I did that, so, simple concept images:

Variable palette screenshot

Variable dropdown menu screenshot

In my own Scratch projects, I have to name variables "self.(name)" or "global.(name)" so that they're all grouped together by the alphabetical sorting:

Variable palette screenshot

It would be nice if they were automatically grouped together by the Scratch editor, instead.

Why can't you have "for stage only" variables?

Maybe it could have a symbol next to it to indicate it's local? Not sure what though.

There's some discussion of that kind of thing in LLK/scratch-blocks#1379

Am I right in thinking the current develop branch version (https://llk.github.io/scratch-gui/develop/) is still missing this feature? I notice there is a "More Options" with a "We're working on it" message.

Implemented!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cyx2015s picture cyx2015s  路  4Comments

kyleplo picture kyleplo  路  3Comments

ericrosenbaum picture ericrosenbaum  路  4Comments

davidaylaian picture davidaylaian  路  4Comments

chrisgarrity picture chrisgarrity  路  4Comments