2 Replies Latest reply on Jul 1, 2009 8:41 AM by armando.manden

    datagrid and xmllistcollections


      hi all,

      i need to remove all items in a xmllistcollections object, this object is the dataProvider of a datagrid component but when a call the removeAll method throws this exception:

      TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
          at main/guardarRegistroRemesa()[D:\Eclipse Home\Pruebas\src\main.as:0]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\co re\UIComponent.as:9051]
          at mx.controls.alertClasses::AlertForm/removeAlert()[E:\dev\3.0.x\frameworks\projects\framew ork\src\mx\controls\alertClasses\AlertForm.as:500]
          at mx.controls.alertClasses::AlertForm/clickHandler()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\controls\alertClasses\AlertForm.as:541]


        • 1. Re: datagrid and xmllistcollections
          chris.huston.t10 Level 3

          This error often gets thrown because the collection has not been instantiated before the removeAll method is called. Are you sure that your collection has been instantiated (such as xmllc = new XMLListCollection();) before your function that uses xmllc.removeAll() is called?



          • 2. Re: datagrid and xmllistcollections
            armando.manden Level 1

            yes, i have instantiated the object with xmlDataGridMarcatel = new XMLListCollection(xmlListMarcatel); this object is in other file because i use it for global variables i have two links that appear to this file, one in my main application and the other in my components files and when a try to call the removeAll() method in my application throws this error.

            i don´t know what is wrong.