0
我正在学习Adobe Air,并希望获得我创建的微调列表中的当前选定项目,但是每次使用selectedItem无论我选择什么选项,我都会一直得到相同的值。我试图让该剧本的应用程序,和本我SpinnerList代码:如何使用微调列表访问Adobe Air中的选定项目?
<s:SpinnerListContainer x="10" y="279" width="325" height="266">
<s:SpinnerList width="69" height="100%" enabled="true" labelField="data" selectedIndex="1" id="From">
<s:ArrayList>
<fx:Object data="Time"></fx:Object>
<fx:Object data="KM"></fx:Object>
<fx:Object data="Miles"></fx:Object>
</s:ArrayList>
</s:SpinnerList>
</s:SpinnerListContainer>
不管是什么,“KM”是始终显示为所选项目时,它不是。这是我的脚本标记:
var selected = From.selectedItem;
我怎样才能解决这个问题? 谢谢