I can't seem too create an ArrayCollection from and array. I have data being returned (type object) which I can successfully type into an array, but when I try to then change it to an ArrayCollection it fails with the follow error. What am I doing wrong?

public function result(data:Object):void
{
                var myList:ArrayCollection = ArrayCollection(data as Array);
}

ERROR: TypeError: Type Coercion failed: cannot convert [EMAIL PROTECTED] to mx.collections.ArrayCollection.



this works fine,

public function result(data:Object):void
{
                var myList:Array = data as Array;
}

this is what is being sent to result()

var sendList: Object = ['test 0','test 1','test 2','test 3','test 4','test 5','test 6'];
responder.result( sendList );
.....


Thanks much,
- Kevin

Reply via email to