|
Palmer Novice
Joined: 21 Mar 2003 Posts: 38 Location: USA
|
Posted: Thu Mar 27, 2003 1:36 pm
Using variables across classes |
is it possible to operate on variables from a class different from the current or default class, without resorting to global variables?
Edit: Sorry for the double post, my browser timed out. Please delete, administrators. =) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Mar 27, 2003 4:02 pm |
Yes it's possbile. Instead of using only the name of the variable, specify the full or relative path to it. Example, suppose you are currently in Class1 and the variable @test is in Class2. Both of these classes belong to the root class (0), then to access the variable you would do:
#SH @Class1/test
Other possibilities are:
#SH @../Class1/test
#SH @./Class1/test
.. referes to the parent class (the root class in this case) while . referes to the root class. You can also start a path with / to signify the current class.
Kjata |
|
|
|
Palmer Novice
Joined: 21 Mar 2003 Posts: 38 Location: USA
|
Posted: Thu Mar 27, 2003 6:34 pm |
Thanks Katja! I found the relevant info in the help files, too; I've got it now.
|
|
|
|
|
|