This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-05-20 10:24:26

Coldlikehell
Scratcher
Registered: 2007-05-20
Posts: 1

Rename Variables

Curently, if you want to change a variable's name you need to delete it, create a new one and then  change manually evrywhere the old one was.

Perhaps including a system to rename variables would make things easier for programmers

Offline

 

#2 2007-05-20 11:33:50

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Rename Variables

Yes.  It would also be better if the set and change blocks had a pull-down menu like broadcast and when-I-receive do, so that variables are easy to change.  Pulling apart scripts to change a variable is *terrible*

Offline

 

#3 2007-05-20 16:29:53

albertus
Scratcher
Registered: 2007-05-20
Posts: 3

Re: Rename Variables

Hi.
I came across the same problem, when I wanted to "localize" all the variables in English, after I started creting them in Portuguese.
Maybe a "smarter" way would be, since this is intended for kids, to have all the blocks related to that variable change the name when we do it on the menu.

Sure, maybe it is more of a pedagogical approach to have kids change it one by one, as "grown up" proggrammers have to, but hey! we have search/replace to help us, right?
Not here, though ;-)

Cheers

Al

Offline

 

#4 2007-05-20 16:57:05

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Rename Variables

Yes, a "change variable name/scope" would be nice.  I've often had a global variable that I wanted to make local or a local variable I've wanted to make global---scratch makes this exceedingly tedious (especially if your eyesight is not good enough to catch the subtle color difference between global and local variables).

Offline

 

Board footer