0 Replies Latest reply on Jan 3, 2008 12:25 AM by pope on acid

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

    pope on acid
      Following code works fine local:
      public function filterAanbiedingen():void
      {
      catalogus.filterFunction = filterByCategory;
      catalogus.refresh();
      }

      public function filterByCategory(item:Object):Boolean
      {
      var isMatch:Boolean = false
      var tevergelijken:String = cboSearch.text.toLowerCase();
      if(item.categories.toLowerCase().search(tevergelijken) != -1)
      {
      isMatch = true
      }
      return isMatch;
      }

      but if i put the bin directory on our Intranet server, as soon I run a filter I get this:


      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at index/filterByCategory()
      at mx.collections::ListCollectionView/internalRefresh()
      at mx.collections::ListCollectionView/refresh()
      at index/filterAanbiedingen()
      at index/__cboSearch_change()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls::ComboBox/dispatchChangeEvent()
      at mx.controls::ComboBox/close()
      at mx.controls::ComboBox/dropdown_changeHandler()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls.listClasses::ListBase/mouseUpHandler()
      at mx.controls::List/mouseUpHandler()


      Anyone has an explenation for this, please? The datasource 'catalogus' is an arraycollection returned from a remote service.

      Thx,