Hi all,
Firstly let me excuse myself by saying I'm pretty new to Flash.
I've read a number of posts on this and other boards regarding problems with comboboxes and managed to work my Actionscript around into something that I feel should be working as a result. However, I can't find the specific answer to my quandry, and I'm tearing my hair out trying to fix it on my own!

The idea is pretty simple - populate a Combobox with one column from a Dataset.
Here's my script so far:
trace(TentTypesDataSet.schema);
var lo:Object = {};
lo.afterLoaded = function(){
trace ("Lo function triggered (dataset loaded)");
count = TentTypesDataSet.length;
trace ("RS function triggered");
trace(count);
for(i=0;i<count;i++)
{
TentTypesCB.addItem(TentTypesDataSet.NAME.getItemAt(i),TentTypesDataSet.NAME.getItemAt(i));
trace (i);
trace (TentTypesDataSet.NAME.getItemAt(i));
}
}
TentTypesDataSet.addEventListener("afterLoaded", lo);
The debug output from this reads as follows:
<properties><property name="ID"><type name="Integer" original="false"><validation className="mx.data.types.Int"><settings /></validation></type></property><property name="NAME"><type name="String" original="false"><validation className="mx.data.types.Str"><settings /></validation></type></property><property name="SIZE"><type name="String" original="false"><validation className="mx.data.types.Str"><settings /></validation></type></property><property name="INFO"><type name="String" original="false"><validation className="mx.data.types.Str"><settings /></validation></type></property><property name="PRICE"><type name="String" original="false"><validation className="mx.data.types.Str"><settings /></validation></type></property><property name="IMAGE"><type name="String" original="false"><validation className="mx.data.types.Str"><settings /></validation></type></property></properties>
Lo function triggered (dataset loaded)
RS function triggered
4
0
undefined
1
undefined
2
undefined
3
undefined
It seems obvious to me that I'm not calling the values stored in the column called NAME correctly, as everything else appears to work.
Can anyone out there please tell me how to correctly call the data held in NAME, as TentTypesDataSet.NAME.getItemAt(i) doesn't work nor do any of the logical alternatives I have tried.
Many thanks in advance (and for my hair too!)
Carl