3 Replies Latest reply on Sep 11, 2006 3:33 PM by ntsiii

    mx:Script function + run time error

    ljonny18 Level 1
      Hi,
      I am calling an mx:Script function from a combo box in Flex 2 in a "change" event..... e.g:

      <mx:ComboBox id="discountType_cb" change="changeDiscountType()">
      ...................................

      in the function I am changing the "text" values of some labels within the application depending on the selected value of the combobox etc..... e.g:

      public function changeDiscountCode()
      {
      if(discountCode.value == "abc")
      {
      validityDates.text="def"
      }
      }

      The application runs without any errors and the function seems to work and do what is expected to do... although I get the following runtime error when the combobox is changed:

      "TypeError: Error #1009: Cannot access a property or method of a null object reference."
      ..................................................................

      Any suggestions?
      Jon