<mx:ComboBox dataProvider="{outerDocument.selectData}">

On 12/18/06, Tero Pikala <[EMAIL PROTECTED]> wrote:

  Hi

This really doesn't work - that was the reason I originally asked the
question!).

It gives error message "Access of undefined property selectData"

After reading docs more carefully I noticed that I can use
<mx:ComboBox dataProvider="{parentApplication.selectData}"> which
seems to make sense for me.

Thanks

Tero Pikala

--- In [email protected] <flexcoders%40yahoogroups.com>, "
ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> <mx:ComboBox dataProvider="{selectData}">
>
>
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Tero
Pikala" <tero.pikala@> wrote:
> >
> > I'd like to know if following code uses proper way to set
dataprovider.
> >
> > It works but should I do things some other way (maybe injecting
> > dataprovider after application has initialized?)
> >
> > Thanks!
> >
> >
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > layout="absolute">
> >
> > <mx:ArrayCollection id="myData">
> > <mx:source>
> > <mx:Object name="Tero Pikala" location="London, U.K."
> > phone="1234" />
> > </mx:source>
> > </mx:ArrayCollection>
> >
> > <mx:ArrayCollection id="selectData">
> > <mx:source>
> > <mx:Object label="test1" data="1"/>
> > <mx:Object label="test2" data="2"/>
> > <mx:Object label="test3" data="3"/>
> > </mx:source>
> > </mx:ArrayCollection>
> >
> >
> > <mx:DataGrid dataProvider="{myData}">
> > <mx:columns>
> > <mx:DataGridColumn dataField="name" />
> > <mx:DataGridColumn dataField="location" />
> > <mx:DataGridColumn dataField="phone">
> > <mx:itemRenderer>
> > <mx:Component>
> > <mx:ComboBox
> > dataProvider="{mx.core.Application.application.selectData}">
> > </mx:ComboBox>
> > </mx:Component>
> > </mx:itemRenderer>
> > </mx:DataGridColumn>
> > </mx:columns>
> > </mx:DataGrid>
> > </mx:Application>
> >
>



Reply via email to