0
我是一个Flex noob,上周我一直在为这个问题而苦苦挣扎,而且我的智慧结束了。显示包含XMLListCollection的列表
我已经打开了下面的XML文件
<root>
<person>
<city-of-death>asdf</city-of-death>
<place-of-death>qwert</place-of-death>
</person>
<person>
<city-of-death>hjkl</city-of-death>
<place-of-death>yuio</place-of-death>
</person>
</root>
使用下面的代码
[Bindable]
private var people:XMLListCollection;
private function resultHandler(event:ResultEvent):void {
people = new XMLListCollection(event.result.person);
}
,我试图,我使用了以下MXML
<s:List left="0" height="94" dataProvider="{people}" labelField="@city-of-death" width="144" y="-1"></s:List>
主要是为了显示它米希望有一个列表显示...但没有任何显示
asdf
hjkl
如果有人能帮上忙,我会非常感激。我拔出我的头发!
嗯不幸的是,这似乎并没有工作。
Matt 2011-05-30 18:26:16如果'event.result'的实际值是XML,则列出'List'标签应该显示没有问题。请将断点放入'resultHandler'的assign语句中,并在Flash Builder调试器的变量视图中检查'event.result'的实际值。 – Constantiner 2011-05-30 18:33:45
谢谢,它的工作!我不确定我做了什么,但删除@似乎有帮助! – Matt 2011-05-30 18:55:21