This content has been marked as final. Show 3 replies
This leads me to suspect that event.result is not an array. The "as" operator will return null if it can't perform the cast. Are you sure that the debugger shows the type of event.result as being Array?
Thank you for responding. I am new to flex and am very disappointed getting stuck on such a basic issue. I am trying to immerse myself in it so that I can become a master but when a simple assignment stops my work for a day it is very frustrating.
Actually the alert.result is an ArrayCollection. So I thought that you had something there. I tried
var myArray1 = new ArrayCollection();
myArray1 = alert.result;
Did not work. // no error but the collection was empty.
var myArray2 = new Array();
myArray2 = alert.result.source; //since source is of array type.
Again no compiler errors but myArray2 is empty after assignment.
When I put a break point in and inspect the source of the alert.result it is full of data. I do not know what to do.
Could it be possible that some package is not available to my instance of flex or that it is corrupt?
I created a new project. I copied all the files over to the new project and everything worked.
I do not know what was corrupted but something was.