Variable naming is funky [FIXED]
Posted: Oct 17th, '15, 18:46
Opened a new project, dragged the Sprite (Instance?) variable 'n' to the workspace and changed its name to nDifferent. Was unable to refer to it with its new name. "set" and 'increase' didn't record the new name. Dragged a 'set n' block into the workspace and executed it. It was no longer bound to nDifferent.
Also, this is not so much a bug, but confusing. The "set local var to _" block can be included in a script or just executed on the workspace and it does nothing. Perhaps it should not be allowed to drop in the workspace at all?
The variable bubble 'var' can be dragged off of it, changed, and broken the same as a regular variable.
Maybe I'm saying that scoping is as hard as objects and the visual metaphors aren't quit there. I ran into this trying to create a very simple example scoping example in GP for my Friday Night Coders.
Perhaps just reorganizing the menu. Start with the header "Sprite Variables" then "Add variable" block, then have a header "Shared variable" followed by Add Shared variable block. I'm on the fence about the already started variables (e.g. n) . Its confusing. Have a third header "Local variables" and put that block under there?
Finally, Delete variable seems to be asking me to get rid of all references to a variable before I can delete it, however, shared variables loose their value, but the blocks remain, which means I can reuse them without redefining them.
All very confusing. Maybe discuss how this could be improved?
Also, this is not so much a bug, but confusing. The "set local var to _" block can be included in a script or just executed on the workspace and it does nothing. Perhaps it should not be allowed to drop in the workspace at all?
The variable bubble 'var' can be dragged off of it, changed, and broken the same as a regular variable.
Maybe I'm saying that scoping is as hard as objects and the visual metaphors aren't quit there. I ran into this trying to create a very simple example scoping example in GP for my Friday Night Coders.
Perhaps just reorganizing the menu. Start with the header "Sprite Variables" then "Add variable" block, then have a header "Shared variable" followed by Add Shared variable block. I'm on the fence about the already started variables (e.g. n) . Its confusing. Have a third header "Local variables" and put that block under there?
Finally, Delete variable seems to be asking me to get rid of all references to a variable before I can delete it, however, shared variables loose their value, but the blocks remain, which means I can reuse them without redefining them.
All very confusing. Maybe discuss how this could be improved?