Len,

globals must be declared to be used.
You need to declare that global in both the script that sets the hilite and also the script that has that if clause. In situations like this, the debugger is your friend and it's good to use it to explore variable values.

just go to the top line in the object script that contains those two pieces of code and add

global gSaveInputPath

if this is not the case, then you're probably failing to set the global in the first place, assure yourself with an answer call or the debugger that the global is actually a global and that its value is correct.

Andre


On Mar 6, 2007, at 12:23 PM, Len Morgan wrote:

In my now 3 year long quest to write just ONE useable Rev program, I was close but ran into something that I just can't figure out. I have a checkbutton on a configuration stack (separate from the main stack) and a global variable that I set the hilite of the button to (mostly so I don't need long convoluted descriptions to get to the state from the main stack).

When it comes time to check the button state, I "put" the global variable and it says it's true. The very next line is:

if gSaveInputPath then
   -- save the path to the file just used for next time
end if

This FAILS every time (I added an else clause to display "not saving path" just to make sure I was actually getting to the code). I also tried

if gSaveInputPath is true then.... and that fails too. If I check my global variables, it is in fact showing "true" so I can't figure out what's (not) going on.

Len

PS: Thanks to Jim Ault for you response on the field question. You were right that I'm not using groups on various cards/stacks to display the same information in different places. I'll give your suggestions a shot as soon as I get this (hopefully simpler) problem resolved.


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to