On October 3, 2010 at 12:59, BluPhenix said...
So, zone2on should always have a Boolean true|false.
As explained, zone2on in the Global space (setGlobal, getGlobal) does not have a boolean value, it is a string.
If i'm not mistaking, in javascript an uninitialised variable does not have a null value, but an undefined value. So w===null will not evaluate to true. Please correct me if I'm wrong.
If w is undefined, z2ind.visible = (w ? true : false); wlll not do anything.
OK, I missed the point that Global space only holds strings. I'll work through that.
On boot up I execute:
// INITIALIZE any state tracking variables on boot
// this call will generate a PS ActionList error which is "normal" due to it jumping out of the current activity
if (System.getGlobal(zone2on) === null) {
scheduleAfter (100, CF.widget("GOTO", "SAVE_STUFF_HERE").executeActions()); // set zone2/outdoor zone
}
In this case the operation evaluate to true and the jummp takes place as expected.
Thank you,