|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Mon Aug 23, 2004 4:39 pm
Keeping variable names unique? |
If I make a subfolder and put an alias named a and a variable named b in that subfolder, creating a new alias named a and a variable called b in the main folder woun't overwrite the alias and variable in the subfolder.
I now have two aliases named a and two variables called b.
I understand this has been done to avoid ppl messing up their own scripts etc. but is there a way to overrule it? Can I overwrite my old aliases and variables as default?
A "Do you want to overwrite this alias/variable" question or somthing would be even better.
I tend to amass a lot of garbage aliases/variables which I end up error-searching for when a script suddenly don't work because I've got a variable with the same name elsewhere. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Mon Aug 30, 2004 5:10 am |
I could think of a few ways to do this but all would be very anoying.
When making a var or alias it should overwrite any in the same class as it.
However if you have b var in a class a and a b var in class c then I can see the confusion.
Your talking about a catalog so you don't accidently write the same var or alias.
Two small ways to keep track......
Don't make the same var or alias
When making a class name like #class mystuff
give the var or alias a name like MyA or MSa or MyB or MSb
to keep it all simple.
The other is to create a database either a var or a real database to keep track of it all.
Good luck |
|
_________________ megamog75
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Aug 30, 2004 9:28 am |
I tend to browse the main folder quite a lot while scripting. Sometimes I just put everything I'm doing in there for simplicity. When I finish creating whatever I've been working on, I create a subfolder and move the settings into it.
When I find that multiple settings are being created when I only intended to change or modify an existing one either directly or through a script, I delete the setting in the subfolder and move the new setting from the none class, into the appropriate subclass. This almost always ensures that future changes modify the correct setting. |
|
|
|
|
|