I try to get unique value on my query combo box. Without if statement there are no errors, but just got same value on the combo box.
(TypeError: Error #1006: getItemIndex is not a function.
at querycombo/private:init/onResult())
See code below:
function onResult(featureSet:FeatureSet, token:Object = null):void
{
var StArr:Array = [];
for each (var myGra:Graphic in featureSet.features)
{
//if (StArr.getItemIndex(myGra.attributes["township"].toString()) == -1 )
// {
StArr.push(myGra.attributes["township"].toString());
// }
}
StArr.sort();
StCb.dataProvider = StArr;
}
Thank you.