Actually, I think that should be cb_sports [rp_brands.currentIndex].selectedItem instead of this ['...'].selectedItem, but I think you get the picture. Debug as necessary. :)
--- In [email protected], "Doug Lowder" <[EMAIL PROTECTED]> wrote: > > You might be able to use the repeater's currentIndex property in your > button's click handler to access the ComboBox instance. Try: > > ... click="trace('selected sport:'+ this['cb_sports' + > rp_brands.currentIndex].selectedItem)" > > --- In [email protected], "t8.chad" <chad@> wrote: > > > > I have a ComboBox within a repeater and I need to get the selected > item > > of the ComboBox. The problem is that the id of the ComboBox is > really a > > pointer to an array of ComboBoxs within the Repeater. > > > > <mx:TabNavigator> > > <mx:Repeater id="rp_brands"> > > <mx:ComboBox id="cb_sports" > > dataProvider="{rp_brands.currentItem.sports"/> > > <mx:Button label="TEST" click="trace('selected sport: > > '+cb_sports.selectedItem)"/> > > > > > > > > > > cb_sports.selectedItem is a null reference, which makes sense since > the > > cb_sports ComboBox is an array of ComboBoxes within the Repeater. > How > > can I get the selectedItem of the ComboBox? I cannot use the > rp_brands > > Repeater's currentItem or currentIndex property as an index to the > > cb_sports ComboBox Array because this is being executed in an event > > ("Repeater is not executing" error). > > > > Thanks. > > >

