Hi Len,

Did you declare 'gSaveInputPath' in the script where you're checking it, in or above* the handler in question? If it's not declared there, your handler treats it as a temp variable whose scope and lifespan are limited to the handler where you check it.

Not that I've *ever* done that myself... I just know someone who did it... (trying to keep a straight face).

Phil Davis


* If declared above the handler in question, it must be declared outside all handlers for this handler to have access to it. If declared in a handler, no other handlers can use it even though it's a global.



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

Reply via email to