PDA

View Full Version : Array in a combo box


netboy
04-17-2006, 11:11 PM
Hello guys,
i'm wondering if someone can helo me, the question is this:
i have to fill a combobox onject with 2 list (the data are the same but one is in italian and the other is in english), i created 2 arrays like this:

var via:Array = ["via 1","via 2","via 3"];
var way:Array =["road 1","road 2","road 3"];

now i have to fill the combobox with the same site language array, to do so i use:

road_cb.dataProvider=way; (in case of english language)

but when the user change language i need to know what kind of array is loaded on the combobox, so if the change site language from english to italian the combobox list have to change but if the user select same language (i.e. english -> english) the combobox list have not to change. So i would like to know if i can find out the name of the array loaded into the combobox to use into an if - else cicle.

Thanks a lot.
Netboy

tg
04-18-2006, 03:55 PM
how is the user 'changing' languages? if this is done via the user interface, then you can set variables at the time it is done.
or is it based on system settings?

netboy
04-19-2006, 11:30 PM
the language switch is in a movie clip, where is setted a variable called flag with the english or italian data.
i just used a variable to decide if change or not the combobox list,but i'd like to know if i can obtain the array name loaded into the combobox object to avaid to use a variable just to check what language has been chosen because i think that is redundant.
so if there is a instruction that tell me the array name (in this exemple i need to obtain as reply via or way)is better 4 me.

thank you