That's because .getItemAt(0) returns an Object (dynamic class) and [0]
doesn't. On the note of coding practices. generally, trying to bind to
single/specific items within an Array or ArrayCollection is prone to
problems (runtime/subscript errors and the like). In some cases it might be
alright - but generally I would think that you would want to attach a
changed even on the slider and handle the assignment of values to
established/bindable variables within a code block where proper exception
handling _could_ take place.
Not so good. text="{'your value: ' + myControl.value.toString() + ' of ' +
MAX_VALUE.toString()}"
Better idea. text="{_valueInfo}" - - > where _valueInfo is set in a function
with a valid event.
Rick Winscot
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Don Kerr
Sent: Sunday, June 08, 2008 8:38 AM
To: [email protected]
Subject: [flexcoders] Re: hslider and binding to values
Try getItemAt(0) instead of [0]. I had similar issues, not specific to
your case, where this worked.
Don Kerr
--- In [email protected] <mailto:flexcoders%40yahoogroups.com> ,
"arieljake" <[EMAIL PROTECTED]> wrote:
>
> I know.
>
> What I am referring to is this:
>
> <Label text="{myHSlider.values[0]} - {myHSlider.values[1]}" />
>
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com> ,
"kenny14390" <kenny14390@> wrote:
> >
> > Binding is curly braces {} not square brackets []
> >
> >
> > --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "arieljake" <arieljake@> wrote:
> > >
> > > I have an hslider with two tabs.
> > >
> > > I am trying to create a label next to the hslider to display the
> > > values it has set.
> > >
> > > We access the values of the hslider using the values array. But we
> > > can't bind when using square brackets.
> > >
> > > what do we do?
> > >
> >
>