Just make the variable bindable and give it as a data source...
Pseudocode:
[Bindable]
data:ArrayCollection ;
resultHandler:void
{
data = event.result ;
//you can also retrieve the event result and preprocess it it first if
you need before assigning it to data
}
<mx:any_component_that_uses_datasource datasource={data}/>
On Fri, Oct 24, 2008 at 4:57 PM, netdeep <[EMAIL PROTECTED]> wrote:
>
> I'm still wondering how to get this working. The underlying ArrayCollection
> data is being changed with each reload but the charts are staying the same.
> The data
> is updated via remoting wiht a Java method, by the way. How do I get the
> binding to work properly?
>
> Here is my method which is handling the results
>
> Attach Code
>
> private function getReloadResults(event:ResultEvent):void {
> // reportObject is a custom ActionScript/Java data structure
> // it contains the ArrayCollection objects for the charts
> report = event.result as ReportObject;
> }
>
> >
> > I have a persistent instance of my Flex App which needs to run constantly
> and recieve data
> > via server push. It displays the latest data via a chart. The charts are
> defined in ActionScript.
> > Here is a snippet:
> >
> > var lineSeries:LineSeries = new LineSeries();
> > BindingUtils.bindProperty(lineSeries, "dataProvider", ser, "pointList");
> // pointList is an
> > ArrayCollection
> > lineSeries.xField="point1";
> > lineSeries.yField="point2";
> > lineSeries.verticalAxis = vAxis;
> > seriesArray.addItem(lineSeries);
> >
> > chart.series = seriesArray.toArray().reverse(); // chart is an instance
> of CartesianChart
> >
> > So when I push out the next data to my app, how do I let these lineSeries
> objects get the new
> > data and redraw the chart?
> >
>
>
>
--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],