2 Replies Latest reply on May 11, 2009 6:46 AM by ShaF10

    IF statement problem


      Hi Guys


      I am having some problems with an IF statement. See code below:


      if(documentContainer.getChildAt(taIndex + 1) is TextArea) {
          //do nothing
      } else {
          //create new textarea


      I'm trying to get rid of the do nothing section of the statement but its not working. Below is my attempt:


      if(!documentContainer.getChildAt(taIndex + 1) is TextArea) {
          //create new textarea


      As you can see I've used to negating operater to flip the output but its not giving the same results as the initial IF statement.