My scripts have a lot of variables
which I want to set to "" from a
"Reset" button.
I've done this so far by listing them
individually but wonder if there's an
easier way - does Rev have a list of
variables I can access?
Putting "" into variables
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Putting "" into variables
Life is just a bowl of cherries.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
From the documentation entry of the 'variableNames' local property:
Also see its friends 'globalNames' and 'localNames' to see which one narrows it down best for you.
Hope this helped,
Jan Schenkel.
You'll probably want to intruduce a naming scheme for your global variables, and make sure not to wipe any other global variables - which is the polite thing to do in an environment where every script can modify any global variableUse the variableNames function to find out which sources of value are available to the current handler, or to see whether a variable name is available for use.
Value:
The variableNames function returns a value consisting of four lines:
1. Parameters passed to the current handler (including leading '@' for parameters passed by-reference)
2. Local variables created in the current handler
3. Local variables created in the current script but outside all handlers
4. Global variables
Within each line, the variable or parameter names are separated by commas.
Also see its friends 'globalNames' and 'localNames' to see which one narrows it down best for you.
Hope this helped,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com