I have a class that manages a var called
allAvailableCategories:ArrayCollection.

I have a list that would like to use that variable as the basis for
its output, but only output a subset, say those categories starting
with the letter 'A'.

Now, since the allAvailableCategories collection can be modified by
other controls, I would like to bind the data provider of the list to
the allAvailableCategories variable, and use a filterFunction to limit
the output in the list.

It seems that setting the filterFunction is affecting the
allAvailableCategories variable when I trace the length of the
allAvailableCategories variable after the listData is refreshed. 

Why?

here is the code:

<model:CategoryData id="categoryData" />
<mx:ArrayCollection id="listData" />
<mx:Binding source="{categoryData.allAvailableCategories}"
destination="listData" />
<mx:List id="categoryList" dataProvider="{listData}" />

<mx:Script>
        <![CDATA[
 this.listData.filterFunction = this.filterBySelectedLetter;
 ]]>
    </mx:Script>

Reply via email to