0
所涉的XMLListCollection被稱爲studentsAll和創建後看起來是這樣的損壞......爲什麼會爲XMLListCollection得到由addItamAt功能在Flash Builder 4.6
<details>
<name>Baughman, John D (@hawaii.rr.com at Pearl City H. S.)</name>
<id>2693</id>
<emailpw>[email protected]</emailpw>
<pw/>
</details>
<details>
<name>Benoit, Sandra (@gmail.com at Pearl City H. S.)</name>
<id>2694</id>
<emailpw>[email protected]</emailpw>
<pw/>
</details>
我再runniing ...
studentsList = new XMLListCollection;
studentsIDs = new XMLListCollection;
for (var _index:int=0; _index < studentsAll.length; _index++) {
studentsList.addItemAt(studentsAll[_index].name, studentsList.length);
studentsIDs.addItemAt(studentsAll[_index].id, studentsIDs.length);
}
Wehn該結束的XMLListCollection studentsAll看起來像這樣...
<details>
<name>Baughman, John D (@hawaii.rr.com at Pearl City H. S.)</name>
<name>Benoit, Sandra (@gmail.com at Pearl City H. S.)</name>
<id>2693</id>
<id>2694</id>
<emailpw>[email protected]</emailpw>
<pw/>
</details>
<details>
<name>Benoit, Sandra (@gmail.com at Pearl City H. S.)</name>
<id>2694</id>
<emailpw>[email protected]</emailpw>
<pw/>
</details>
諾蒂奇e第一個索引中的標籤如何被複制。
這是一個錯誤?
感謝,
約翰
爲何會出現新的後失蹤的XMLListCollection()?你也需要使用addItemAt而不是addItem? – Neil 2013-02-11 14:32:17
你說得對,我好像在很多地方都離開了(),但這似乎並不重要。我現在已經修好了。至於addItemAt是不是我在我的示例代碼中有什麼?感謝您的迴應。 – user278859 2013-02-24 23:00:27