Try rolling with this, to see if it makes a difference:

private var _dataInput:ArrayCollection;

[Bindable( event="dataInputChange" )]
public function get dataInput():ArrayCollection
{
      return _dataInput;
}

public function set searchResults( data:ArrayCollection ):void
{
      _dataInput = data;
      dispatchEvent( new Event( "dataInputChange" ) );
}

-TH

--- In [email protected], "biosmonkey" <biosmon...@...> wrote:
>
> I don't know if I can post source, but let me see...
> Here is source for a sample app:
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="vertical" xmlns:ns1="*" horizontalAlign="left">
> <mx:Script>
> <![CDATA[
> import mx.collections.ArrayCollection;
> [Bindable] public var myAC:ArrayCollection=new
> ArrayCollection();
> [Bindable] public var myInt:int=0;
> ]]>
> </mx:Script>
> <mx:DataGrid dataProvider="{myAC}">
> <mx:columns>
> <mx:DataGridColumn headerText="Data" dataField="data"/>
> </mx:columns>
> </mx:DataGrid>
> <ns1:MyComp dataInput="{myAC}" dataIntInput="{myInt}" />
> <mx:Button label="Add Item" click="{myAC.addItem({data:123})}"/>
> <mx:Button label="Increment Int" click="{myInt++}"/>
> </mx:Application>
>
> and here is source for the component "MyComp.mxml":
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml";>
> <mx:Script>
> <![CDATA[
> import mx.collections.ArrayCollection;
> import mx.controls.Alert;
> public function set dataInput(data:ArrayCollection):void
> {
> Alert.show("Setting dataInput="+data);
> }
> public function set dataIntInput(data:int):void
> {
> Alert.show("Setting int="+data);
> }
> ]]>
> </mx:Script>
> </mx:HBox>
>
>
> All I am doing here is showing a datagrid that is bound to an
> arraycollection, along with a custom component with a setter function
> that is also bound to the same a.c.
>
> If you click the button to add an item, it shows in the datagrid,
which
> means it is detecting the change to the arraycollection as I would
> expect. However, the setter in the custom comp does not fire.
>
> As a test, I also added a simple int, which IS being detected by a
> different setter.
>
>
>
>
>
>
>
> --- In [email protected], "Tim Hoff" TimHoff@ wrote:
> >
> >
> > Probably going to have to show us your getter/setter code; as well
as
> > the corresponding private var. If it's an ArrayCollection, it should
> > work.
> >
> > -TH
> >
> >
>


Reply via email to