8 Replies Latest reply on Jun 2, 2009 12:47 PM by armando.manden

    Error 1009 null object


      Hi all,
      i have a flex application with as3 but when i run the application always appear the following error:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      i was trying several solutions posted in actionscript forums but it don´t result, i trying with instance object and other solutions i have one application and three components into the application the follow code is part of the application:
      private function  init():void

      vistaContenedor.botonActualizarPais.addEventListen er(MouseEvent.CLICK,botonCtlgPais);

      vistaContenedor.botonNuevoPais.addEventListener(Mo useEvent.CLICK,botonCtlgPais);

      vistaContenedor.botonEliminarPais.addEventListener (MouseEvent.CLICK,botonCtlgPais);

      vistaContenedor.dgPais.addEventListener(MouseEvent .CLICK,dataGridPais);

      vistaContenedor.srvCatalogoPais.addEventListener(M ouseEvent.CLICK,respuestaSrvCatalogoPais);
      from the first line (vistaContenedor.botonActualizarPais.addEventListener(MouseEvent.CLICK,botonCtlgPais)i have the error code, where vistaContenedor (ViewStack) it is the component id and botonActualizarPais is a button object inside vistaContenedor component.
      i don´t know what´s the problem with the code
      thanks for all