[flexcoders] Re: ComboBox.selectedItem within a Repeater

2007-04-09 Thread Doug Lowder
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 flexcoders@yahoogroups.com, "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 flexcoders@yahoogroups.com, "t8.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.
> > 
> > 
> >  
> >   > dataProvider="{rp_brands.currentItem.sports"/>
> >  
> >  >
> > >
> > 
> > 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.
> >
>




[flexcoders] Re: ComboBox.selectedItem within a Repeater

2007-04-09 Thread Doug Lowder
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 flexcoders@yahoogroups.com, "t8.chad" <[EMAIL PROTECTED]> 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.
> 
> 
>  
>   dataProvider="{rp_brands.currentItem.sports"/>
>  
>  >
> >
> 
> 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.
>