我目前正在Adobe Flex/Actionscript中为一个人的搜索应用程序创建一个列表。目前,列表显示1行文字:列表显示多行Adobe Flex/Actionscript
<fx:Script>
<![CDATA[
import model.PersonSummary;
import mx.collections.ArrayCollection;
import spark.events.IndexChangeEvent;
[Bindable]
public var listOfPeople:ArrayCollection;
public function populate():void{
listOfPeople = new ArrayCollection(String(data).split("\n"));
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:List width="100%" id="results" dataProvider="{listOfPeople}" change="clickPerson(event)">
</s:List>
所以listOfPeople只是一个字符串列表...香港专业教育学院尝试添加“\ n”来这些字符串的有效补充线多的细节,但“\ n”之后的任何内容都不会显示在屏幕上,有什么想法?
感谢 菲尔
例如:
PERSON1
年龄
性别
PERSON2
年龄
性别
等
为什么不让字符串逗号分开? – chchrist 2011-03-30 15:12:09