3 Replies Latest reply on Aug 25, 2011 4:12 AM by carstephun

    evaluation of boolean expression


      Hi there,


      flex, 4.0.x


      I came accross a strange behavior by evaluating the following expressions (function):


      public function calculateIsNext():void
           if ( _currentState == "FirstPage" )
                isNext = ((StoreManufacturerCode!='') && hasSelectedProducts);
                dispatchEvent( new Event( "ChangeValidation" ) );



      the problem lies on the line where isNext is calculated, whenever I stop there while debugging, both part of the expression are true, and just exit the function after that line, dispatchEvent is not runned.


      I had that line also with if else statements, where isNext = true, never evaluated even both expression parts are ture


      Does anybody encountered a similar behaviour?


      r. Sandor