What do you want exactly in the text area? Do the formatting by hand:
Something like:


for all tiem in the collection
output:String = itmem.text  + item price + .. + "/n";

Make sure to keep in sync with the collection.

C


________________________________
 From: ZIONIST <stinas...@yahoo.com>
To: flexcoders@yahoogroups.com 
Sent: Monday, December 26, 2011 12:43 PM
Subject: [flexcoders] Using arraycollection as text for a flex TextArea 
Component.
 

  
Hello Guys i have an arraycollection that is populated dynamically and would 
like to use the same arraycollection as text for a TextArea component. Below is 
my array collection
  collec
[Bindable]
private var orderColl:ArrayCollection=new ArrayCollection();

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var str:String = orderColl.source.join("\n");
cart.text = str;

The result in the textarea is [object object]. Any help guys?


 

Reply via email to