Why wouldn't you just do this:

<TextInput text="{myDataProvider.data.name[0]}" />



On Thu, Jul 15, 2010 at 4:38 PM, mark.embrey <mark.c.emb...@gmail.com>wrote:

>
>
> Actually, as I understand it, I am using ActionScript to create a variable,
> but I am then binding that to an mxml component, no?
>
> anyway, any ideas of how to do this?
>
> thanks!
>
> Mark
>
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "valdhor" <valdhorli...@...> wrote:
> >
> > That would never have worked in Flex 3.
> >
> > You are trying to use a binding expression in ActionScript code which
> will never work. Binding expressions like that will only work in MXML code.
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "mark.embrey" <mark.c.embrey@> wrote:
> > >
> > > Adobe, in their infinite wisdom, removed the "data" property from Spark
> > > TextInput.
> > >
> > > There is an example of assigning bindable data to a variable for use in
> > > the text value with Flex 4 at Binding to an MXML TextInput control
> > > <
> http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6\
>  <http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6>>
> > 9084-7d85.html> . I have tried to implement this technique but have
> > > still been unable to get it to work.
> > >
> > > When I specify the following:
> > >
> > > [Bindable]
> > > public var
> > > collection:String="{myDataProvider.data.name.[0]}";
> > >
> > > I simply receive the following in my textInput field:
> > >
> > >
> > > {myDataProvider.data.name.[0]}
> > >
> > > Does anyone have any ideas as to how I might specify a bindable
> variable
> > > such that it will display as desired ?
> > >
> > > (FWIW, this worked like a charm in Flex 3)
> > >
> > >
> > > thanks!
> > >
> > > MCE
> > >
> >
>
>  
>

Reply via email to