Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
bulletta #1
Error populating list
Hi!
I have a document with two listboxes, one called "lista_firenze" and the other
called "lista_toscana". The "lista_toscana" has no problem, the other remain
empty, and everytime I try to populate it with an additemat I receive the
following error: "Cannot add an item past the end of the DataProvider". The
listboxes are absolutely identical, I duplicated one on the other, just
renaming its istance.
Could you help me, please? ...
Here is the code:
lista_toscana.color = 0xFFFFFF;
lista_toscana.fontFamily = "TradeGothic CondEighteen";
lista_toscana.fontSize = 14;
lista_toscana.backgroundColor = 0x3D635B;
lista_toscana.borderStyle = "none";
lista_toscana.selectionColor = 0x3D635B;
lista_toscana.textSelectedColor = 0xFFFFFF;
lista_toscana.useRollOver = false;
lista_toscana.scrollTrack = 0x29534A;
lista_firenze.color = 0xFFFFFF;
// .... and so on, same properties of "lista_toscana"
dati_xml = new XML();
dati_xml.ignoreWhite = true;
dati_xml.path = this;
dati_xml.load("XML/file.xml");
function xmlOnLoad() {
if (dati_xml.loaded) {
_root.xml_loaded = true;
var nodes = this.childNodes;
for (var j = 0; j<nodes.length; j++) {
if (nodes[j].nodeName == "mostre") {
mostre = nodes[j].childNodes;
for (var i = 0; i<mostre.length; i++) {
evento = mostre[i].childNodes;
for (var k = 0; k<evento.length; k++) {
if (evento[k].nodeName == "EV-IdEvento") {
IDEvento = evento[k].childNodes[0].nodeValue;
}
if (evento[k].nodeName == "SE-CAP") {
cap = Number(evento[k].childNodes[0].nodeValue);
label=EVTitolo+"\n"+EVNomeSede+"\n"+EVDataInizio+"
- "+EVDataFine;
if (cap > 50100 && cap < 50999) {
this.path.lista_firenze.addItemAt(i, label,
{data:IDEvento});
}
if (cap > 50000 && cap < 59999) {
this.path.lista_toscana.addItemAt(i, label,
{data:IDEvento});
}
}
}
}
}
}
lista_firenze.sortItemsBy("label", "ASC");
lista_toscana.sortItemsBy("label", "ASC");
}
};
dati_xml.onLoad = xmlOnLoad;
bulletta Guest
-
Populating a <mx:List> with XML
I am trying to do a simple list population with a series of names from a local XML file. I'm looking for direction regarding how to pull my element... -
Populating an array with a list of values
I have performed a cfhttp request, the results of which are in a variable called FoundString. Found String consists of a list of website links, I... -
Populating three list boxes from the database
Can anybody help? I need to have three list boxes automatically populating each other, (ie when region is selected from the first listbox, it will... -
Dynamical populating a list that can be used as drop down list
Hi, I have a solution in which a person can be a member of one or more groups. In this case the groups are those used in the protection schema of... -
List box not populating fully.
Hi all, I have encountered a very strange problem on one of my list boxes. When I open the form it is on, the listbox populates correctly based...



Reply With Quote

