Any help as to why the following would be greatly appreciated.
This line;
Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
works well within my program. Both sUse and sTheName are defined and the alert displays thier values. But if I add:
debugPrintln("vFlag2="+vFlag);
if (vFlag == false)
{ Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
vFlag = true;
}
debugPrintln("vFlag3="+vFlag);
vFlag prints false on the way in, true on the way out, however the alert does not fire.
The line I want to use is:
if (vFlag == false &&
sUse != "ALL" &&
sUse != "NQ" &&
sUse != "YM" &&
sUse != "NONE")
{
Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
vFlag = true;
}
is the same as the example above. When all conditions are true, it enters the routine, resets vFlag to true, however does not trigger the alert.
What am I doing wrong? All comments are appreciated.
Merv
This line;
Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
works well within my program. Both sUse and sTheName are defined and the alert displays thier values. But if I add:
debugPrintln("vFlag2="+vFlag);
if (vFlag == false)
{ Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
vFlag = true;
}
debugPrintln("vFlag3="+vFlag);
vFlag prints false on the way in, true on the way out, however the alert does not fire.
The line I want to use is:
if (vFlag == false &&
sUse != "ALL" &&
sUse != "NQ" &&
sUse != "YM" &&
sUse != "NONE")
{
Alert.addToList("Incorrect use of "+sUse, "Use capitals " + sTheName, Color.green, Color.black );
vFlag = true;
}
is the same as the example above. When all conditions are true, it enters the routine, resets vFlag to true, however does not trigger the alert.
What am I doing wrong? All comments are appreciated.
Merv
Comment