Skip to main content
Inspiring
April 17, 2006
Question

How to resolve multiple variable names

  • April 17, 2006
  • 1 reply
  • 183 views
Hi,

How do you resolve references to variables on multiple screens - i.e

I have multiple variables on multiple screens and I want to use a for loop to access the variable names as well as the screen names.

e.g. 5 screens ... Screen1 thru Screen5... variables on each screen Screen(n)_1 thru Screen(n)_5

So I want to resolve the screen name _root["Screen"+i], but then I want to resolve the variable within that screen name. How do you do that? _root["Screen"+i][/var/] ? , _root[["Screen"+i][/var/]]. _root["Screen"+i+"."+[/var/]]??

I've tried allsorts of syntax, but can't seem to resolve an evaluated variable name within an evaluated ScreenName.

Any help would be appreciated.






This topic has been closed for replies.

1 reply

Inspiring
April 17, 2006
Hi,

the first way is right, _root["Screen"+i][var]. If it's not working, it should be because of wrong name, path or something like that (I guess /var/ was just an example, because it's not a legal variable name, I'd think).

cheers,
blemmo