3 Replies Latest reply on Jan 16, 2012 9:59 AM by GordonSmith

    Strength behavior of Flex compiler for assignment

    jitendra.sapariya@gmail.c

      Hi adobe,

       

      today i have something to discuss here about flex comiler,

       

      i am having below code,

       

       









      for each(var item:Object in BannerData)





      {





      var temp:Object=new Object();




      temp.id = temp.id;





      temp.tempCamScreenId = item.campaignId;




      temp.logo = item.couponImage;







      temp.isChanged = item.isChanged;







      temp.couponId = item.couponId;







      temp.couponCode = item.couponCode;







      temp.isCheckSelected = false;







      dgSummaryDP.addItem(temp);







      }









       

       

      while running and debugging above lines i found no error and it was working perfectly,

      now once  i release build and deployed i found stack over flow error,

       

      in above code item is my data provider which is used to assign data to temp.

      now my question is when i assigned temp.id=temp.id why not flex compiler thow me an error  for such assignment why it was passed silently and come up in picture during release,

      temp variable is not bindable here,

      due to this assignment i got stack over flow message as it was kind of recurssion between id's but  why not comiler detected this wrong assignment syntex at debugged or at compile  time,

       

      please suggest me.