0 Replies Latest reply on Feb 13, 2012 8:42 AM by DOULETTE

    httpservice resulthandler in different window

    DOULETTE

      I am working on an AIR application with 2 windows: One to create a new customer and another to display some information about the customer. On window 1, there is also a textfield to search for a customer by Id or name.

       

       

      These are the steps to create a new customer:

       

       

      with an "add" button on window 1, I open window 2.

      on window 2, the user completes a form to create a new customer.

      the information is saved in a MySQL Database over an HttpService.

      The result handler method calls a public function on window 1:

       

       

      result = "new wWin1().resultSaveCustomer(event)"

      This part works well - the new customer Id is received.

       

       

      In some cases, according customer data, I change the component color - this operation works well, if I load a customer after a using the search field, but if I search directly from the resultSaveCustomer function (after completion of step 3), a message appears:

       

       

      Cannot access a property or method of a null object reference.

       

       

      I don't understand why, because all the components in window 1, have an Id name! Or the property is a label with Id Name.

       

       

      Thanks for helping me.