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] wrote: 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  wrote:

 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, my_schema[1]:Some
 strings});
 my_cb.dataProvider = my_data;
 My intention is to obtain for my_data the form
 my_data.addItem({data:Some data, label:Some strings});
 but not work.
 Shure, can do that without this, but i want to suggest what i want to
 do, because in a more complex situation, will build an function that
 populate data grid or combo box based on a given schema.
 How i can resolve that?


 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




-- 
...helmut
helmutgranda.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


 
-
Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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(obj);
 my_cb.dataProvider = my_data;

Work well how to suggest Adrian. Thanks!!!

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[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, my_schema[1]:Some
strings});
my_cb.dataProvider = my_data;
 My intention is to obtain for my_data the form
 my_data.addItem({data:Some data, label:Some strings});
 but not work.
Shure, can do that without this, but i want to suggest what i want to
do, because in a more complex situation, will build an function that
populate data grid or combo box based on a given schema.
How i can resolve that?


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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 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, my_schema[1]:Some
strings});
my_cb.dataProvider = my_data;
My intention is to obtain for my_data the form
my_data.addItem({data:Some data, label:Some strings});
but not work.
Shure, can do that without this, but i want to suggest what i want to
do, because in a more complex situation, will build an function that
populate data grid or combo box based on a given schema.
How i can resolve that?


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
...helmut
helmutgranda.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com