I have the following code written that is supposed to use the boolean variable (bInit) to do some things only once, each time the EFS starts up.
However, when I run this, the EFS never executes the "if (bInit == false)" routine. If it did, then it would post the messsage "Initialization Done" to the Alert window.
Can someone please help me figure out what I have wrong here, and why this "if (bInit == false)" routine never executes?
Thnx
var bInit = false;
function preMain() {
setPriceStudy(false);
bInit = false;
}
function main() {
if(bInit == false) { // Only do this loop the very first time this is ever loaded.
bInit = true;
Alert.addToList("X", "Initialization Done", Color.red, Color.green );
}
Alert.addToList("Z", "tick", Color.black, Color.black );
return;
}
However, when I run this, the EFS never executes the "if (bInit == false)" routine. If it did, then it would post the messsage "Initialization Done" to the Alert window.
Can someone please help me figure out what I have wrong here, and why this "if (bInit == false)" routine never executes?
Thnx
var bInit = false;
function preMain() {
setPriceStudy(false);
bInit = false;
}
function main() {
if(bInit == false) { // Only do this loop the very first time this is ever loaded.
bInit = true;
Alert.addToList("X", "Initialization Done", Color.red, Color.green );
}
Alert.addToList("Z", "tick", Color.black, Color.black );
return;
}
Comment