4 Replies Latest reply on Sep 21, 2009 2:01 PM by Jared Langdon

    Variable scope weirdness?

    Jared Langdon Level 1

      I'm having a problem with a script component, and I think it might be a bug.  I reproduced the problem with this simplified version:


      if (true) {
          int nTest = 1;
              nTest = 5;
              patExecContext.setProcessDataIntValue("/process_data/@nTest", nTest);



      I think my process variable nTest should come out as 5, but I'm getting 1. The same problem happens with Strings.


      Can someone reproduce this and let me know if I'm losing my mind here?  Thanks.