Flex: Rendering a bound TileList - when does it finish rendering?
        Posted  
        
            by python_noob
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by python_noob
        
        
        
        Published on 2010-05-14T03:39:16Z
        Indexed on 
            2010/05/14
            3:44 UTC
        
        
        Read the original article
        Hit count: 325
        
Hi, I have an mx:TileList which is bound to an ArrayCollection. I have some code that displays a "Loading..." message before modifying the ArracyCollection and some code after that hides the loading message.
For small data sets, it works fine. However, I noticed with an array size of about 50~ and larger, flex will hide my loading message before the TileList is finished rendering the new data and I'm left with a blank screen for an odd second.
Is there an event I can listen to that is called after the TileList is finished re-rendering? Code looks something like this:
loading_message.visible = true;
for each (var x:Object in new_data) {
    tile_list_data.append(x); // bound to my_tile_list component
}
my_tile_list.validateNow();
loading_message.visible = false;
In this example, loading_message appear, disappear, and then the flex app will lag before finally revealing the updated TileList.
Any ideas? Thanks!
© Stack Overflow or respective owner