When i have to add more than one data i like to use objects rather than
arrays like so
var obj:Object = new Object();
obj.name = foo;
obj.age = 18;
obj.weight = 500; //lbs pretty big !
lista.addItem ({label:Shown on list,data:obj});
// then to get the data.
age = lista.selectedItem.data.age;
Need a tiny help here folks,
I have a listBox which i am inserting items with one label and two values of
data in it.
Like this:
lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);
Now, how can i get the value of my data (2nd one) ?!
At first i haded only one value in
mailing list
Subject: [Flashcoders] ListBox component, get Data (2nd Value)?!
Need a tiny help here folks,
I have a listBox which i am inserting items with one label and two values of
data in it.
Like this:
lista.addItem (categorias[n + 1], categorias[n + 0], categorias[n + 3]);
Now, how can i
PROTECTED] [mailto:
[EMAIL PROTECTED] On Behalf Of MJorge
Sent: Friday, September 01, 2006 10:47 AM
To: Flashcoders mailing list
Subject: [Flashcoders] ListBox component, get Data (2nd Value)?!
Need a tiny help here folks,
I have a listBox which i am inserting items with one label and two values
of
data
Sorry, try this:
trace(Lista.selectedItem.data);
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Coning
Sent: Friday, September 01, 2006 11:11 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] ListBox component, get Data (2nd Value)?!
Try
AFAIK, addItem takes only the label and ONE data element.
To save 2 data elements into the data part, you can make an array with both
the values, and add that array as the data.
Like this:
lista.addItem(categorias[n + 1], [categorias[n + 0], categorias[n + 3]])
Now, to access the second
6 matches
Mail list logo