4 Replies Latest reply on Oct 11, 2011 7:11 AM by anixan

    Android Air App Checking List Properties (Empty??, Populated??)?!?

    anixan Level 1

      Hi,

       

      I am currently developing an Android App using Flashbuilder (AIR) and I have some lists that I use in this app which are populated by web services. I am looking to make sure that each time my users go from View to View the lists dont keep repopulating by calling the web service again. At the moment this happens a lot and it is slowing down the app. I am using a "<s:List" with a "<s:AsyncListView" contained within it.

       

      I really just need to know if there is an easy way to get my app to know that the list has already been populated by the Web Service and not to try and recall the Web Service again? As it would also be very good to show a message stating that "No Results Found" when the Web Service brings nothing back, I am using an Event Listener on the Web Service so I dont know weather this can be done on this. I did try the below which did not work:

       

      getAllJResult.addEventListener(ResultEvent.RESULT, onResult);
      
      protected function onResult (event:ResultEvent):void
                  {
                      if(event.result == null)
                      {
                          trace("None Found");
                      }
                      busy.visible = false;                
                  }
      

      Thanks