0
votes

My xml looks like this:

<feed title="'.$item->title.'" category="'.$categoryname.'">
<item category="'.$categoryname.'">
<title category="'.$categoryname.'">'.htmlspecialchars($item2->title).'</title>'
<description category="'.$categoryname.'">'.htmlspecialchars($item2->description).'</description>
<pubdate category="'.$categoryname.'">'.$item2->pubDate.'</pubdate>');
</item>
</feed>

And My filterfunction looks like this

private function handleCategories(event:Event):void{

            filter = event.currentTarget.selectedValue;
            feedData.filterFunction = categoryFilter;
            feedData.refresh();

        }
            protected function categoryFilter(item:XML):Boolean
            {
                return item.@category == filter;
                trace(filter);
}

When i load in my list it displays properly but when i filter (clickin a radiobutton) it keeps showing the same list. The trace you see above gives back the right category so that isn't the problem...

1

1 Answers

0
votes

Do you have something like

<fx:Declarations>
    <s:RadioButtonGroup change="handleCategories(event)" />
    <s:XMLListCollection id="feedData" />
</fx:Declarations>

or:

[Bindable]
private var feedData:XMLListCollection;

? And do you have any compiler or runtime warnings?