My problem is simple. I know each of my projects have tasks. If I
delete the loop. The second Alert.show print the good length. But with
the loop, the second Alert.show print 0 except for the last loop. If i
delete the first Alert.show, the second print 0 even for the last
loop.  I understood its due to a problem of exectution time but how
can i do to do what i want. Thank you.


Here is the code :

private function getTasks():void
{
    currentState='';
    if (document.listProject.selectedIndex == -1)
    {
        var projectsArray:ArrayCollection =
ArrayCollection(document.listProject.dataProvider);
        var tmpArray:ArrayCollection = new ArrayCollection();
        var i:int;
        for (i = 0; i < projectsArray.length; i++)
        {
            mx.controls.Alert.show(projectsArray.getItemAt(i).id);
            taskDataService.fill(tmpArray, "tasksProject",
[projectsArray.getItemAt(i).id]);
            mx.controls.Alert.show(tmpArray.length.toString());
            
        }
    }
       else
        taskDataService.fill(document.tasksArray, "tasksProject",
[document.listProject.selectedItem.id]);
 }




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to