Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flex get contents of arraycollection as string

Tags:

apache-flex

I am trying to get the contents of an arraycollection to print out using my debug function (which takes a string). Anyone know how to do this? I would like it would be rather easy but can't seem to find a way...I get the word "Object" printed a lot of the time.

like image 911
thomas Avatar asked Mar 18 '26 08:03

thomas


1 Answers

It's a lot cleaner to do:

var str:String = '['+myArrayCol.source.join(', ')+']';

the source property of an ArrayCollection is an Array, so all the usual functions are available.

like image 179
sharvey Avatar answered Mar 21 '26 11:03

sharvey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!