基于以下数据
public var dataArray:ArrayCollection = new ArrayCollection( [
    { label: "None", data: '' },
    { label: "Some Data", data: 
        { 
            label: "String tested at IF", data: "20"
        }
    }
]);
然后我根据用户从下拉列表中选择的位置创建一个新的 ArrayCollection obj
var skillArrayCollection:ArrayCollection  = ArrayCollection(runtimeComponents[dataArray[classSelect.selectedIndex].data]);
我正在循环一个 ArrayCollection 对象,如下所示:
  for each (var item:Object in skillArrayCollection[charSkillOne.selectedIndex]) { 
        if (item.label == "somelabel") {
           ret = ret + Number(item.data);
          }
  }
当 if 语句进行检查时,它匹配字符串 test 并返回正确的结果;IT 还返回错误:ReferenceError: Error #1069: Property label not found on String and there is no default value。
我不明白 flex 将如何出错并返回我要求的结果?