Re[2]: [Flashcoders] problem with combo box and array

2006-12-06 Thread Fratiman Vladut
Wednesday, December 6, 2006, 10:46:10 AM, you wrote: > You could try something like this : > var my_schema:Array = new Array("data","label"); > var my_data:Array = new Array(); > var obj = new Object(); > obj[my_schema[0]] = "Some data"; > obj[my_schema[1]] = "Some strings"; > my_data.addItem(ob

Re: [Flashcoders] problem with combo box and array

2006-12-06 Thread Adrian Ionut Beschea
You could try something like this : var my_schema:Array = new Array("data","label"); var my_data:Array = new Array(); var obj = new Object(); obj[my_schema[0]] = "Some data"; obj[my_schema[1]] = "Some strings"; my_data.addItem(obj); my_cb.dataProvider = my_data; Helmut Granda <[EMAIL PROTECTED]

Re: [Flashcoders] problem with combo box and array

2006-12-05 Thread Helmut Granda
What are you getting on your cb? It sure looks like my_schema[0] should work, unless you have to hack it like item1= my_schema[0] and then add item1 to your cb. just an idea. On 12/5/06, Fratiman Vladut <[EMAIL PROTECTED]> wrote: Hi! This is some example for simplicity. I have one combo box

[Flashcoders] problem with combo box and array

2006-12-05 Thread Fratiman Vladut
Hi! This is some example for simplicity. I have one combo box named my_cb. I have two arrays, one named my_schema and second my_data. var my_schema:Array = new Array("data","label"); var my_data:Array = new Array(); I want to populate combo box in this mode: my_data.addItem({my_schema[0]:"Some data