LostInRecursion
07-20-2006, 02:38 AM
God, I need help on this. I am totally up the creek...
I am using a TileList component with a custom renderer which has all the following properties:
stylename
typename
colorname
...
I have made the TileList dragEnabled and the target List component dropEnabled.
Here's the rub...
When I drag from the TileList component to the List component, I get the following string in the List box "[object Object]"
Ok, so I went ahead and used this code to try and format the data to what I need it to look like. I called the function from the dragDrop property of the target List component:
private function addToCart(event:DragEvent):void{
var items:Array = event.dragSource.dataForFormat("items") as Array;
var blindLabel:String = items[0].typename + " | " + items[0].stylename + " | " + items[0].colorname;
aCart.push({label: blindLabel, data: items[0].blindID});
}
Problem is, I still get the [object Object] right before what I have added.
Anyway to format the data correctly without having t jump through all these hoops?
I am using a TileList component with a custom renderer which has all the following properties:
stylename
typename
colorname
...
I have made the TileList dragEnabled and the target List component dropEnabled.
Here's the rub...
When I drag from the TileList component to the List component, I get the following string in the List box "[object Object]"
Ok, so I went ahead and used this code to try and format the data to what I need it to look like. I called the function from the dragDrop property of the target List component:
private function addToCart(event:DragEvent):void{
var items:Array = event.dragSource.dataForFormat("items") as Array;
var blindLabel:String = items[0].typename + " | " + items[0].stylename + " | " + items[0].colorname;
aCart.push({label: blindLabel, data: items[0].blindID});
}
Problem is, I still get the [object Object] right before what I have added.
Anyway to format the data correctly without having t jump through all these hoops?