Best way to find/set a ComboBox value?

I’m creating an Air app, but I think this is more of a general AS3 question (I’m using Flash CS4).

I have 3 ComboBoxes ( They are created in the IDE not using code. ):

one for day (cb_date, dataprovider of {label:“1”,data:1} -> {label:“31”,data:31})
one for month(cb_month, dataprovider of {label:“January”,data:1} -> {label:“December”,data:12})
one for year(cb_year, dataprovider of {label:“2007”,data:2007} -> {label:“2009”,data:2009}).

I’ve got the information for yesterday (when I need to set the date in the 3 boxes) in a Date object, I know that you can set selectedItem/selectedIndex of the comboboxes to set the right selection, but finding which one it matches is proving to be difficult :frowning:

var tmpDP:DataProvider = cb_date.dataProvider;            

The above returns 0 if i run it in the constructor for the page class, and I cant seem to spot anything else in the verbose documentation for it that will give me a list or length of items so I can loop thu until I find what I’m looking for.

While in this case I can hardcode the lengths, but as I’m learning AS3 (I have 10+ years of flash experience), I wouldnt mind knowing how to do this because I’m not always going to be able to hardcode them.