Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Posts: 43
Registered: ‎11-17-2010
My Device: Not Specified

How to figure out when list is fully loaded

Hi everyone!


An app I am working on is almost complete, however there is some fine tuning involved and I've run into a slight problem with one of the issues. I have a progress indicator that shows up while lists are being populated with items. Items populating the lists are dynamic and I am making a service call to get these items. In some cases there are quite a few items within the list and loading them takes a while. The list stays blanks while these items are being populated.


Now the problem is that the progress indicator goes away as soon as the list component is loaded in the view, even though it hasn't finished populating with list items. I want it to work so that the indicator only goes away once all items have been filled within the list. Is there any way I can achieve this or check for this using an event?


Any help or guidance is appreciated.





Posts: 327
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition
My Carrier: Rogers

Re: How to figure out when list is fully loaded

[ Edited ]

the way I populate my lists is by doing an HTTPRequest to an array, have the array as a dataprovider, then remove/add the list that has already been added with the new dataprovider....


so basically, when the app is first loaded, I addchild the list with whatever content i have for it, then when I Hit the button to call the HTTPRequest, I take that data, throw it in an array, and then remove the original list and add the new one.


**And I use an Activity indicator as well for this....I start the activity indicator when the app first loads it data, then end it as soon as the list has been added (which is of course after the data has been populated into the array and used as a dataprovider), and start it whenever the button is pressed again...and end when done and so on...

CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting
Posts: 43
Registered: ‎11-17-2010
My Device: Not Specified

Re: How to figure out when list is fully loaded

Hmm that is a nice way to do it....I think this might help me and will be a good work around.


Thanks so much!