I have an if else block that is matching every combination, all at once.

To verify what I was suspecting I hard coded values to make portions of the 
block impossible but they are still occuring, I'm assuming that the project is 
not being rebuilt but when I comment lines, the code is no longer executed, but 
the block is still executed.

example

x = true;
y = false;

if(x == true && y == false)
{
    doSomething();
}
else if(x== false && y == false)
{
    if( x == true)
   {
          Alert.show("Should never happen.");
    }
    doSomethingElse();
}
else
{
 //do nothing
}
 
In my example I'm sure that I should never see the alert message, but I get it 
the message every time the code is executed. I ran the 'Clean' option in under 
the Build menu and the source recompiled, the problem remains. 



      

Reply via email to