I haven't looked at your code too much but what jumped out at me is this line...

filterData = filterData.(attribute(prop.name) == prop.value);

This will try to evaluate attribute as a function with parameter prop.name and 
then compare that to prop.value returning a boolean. So, the upshot is that 
Flex will try to evaluate filterData.true or filterData.false. I'm pretty sure 
that won't work.


--- In [email protected], "fatmanchan2009" <fatmanchan2...@...> wrote:
>
> Hello
> 
> Can anyone figure out this problem im currently having, and explain the 
> reasons and cause of this proplem.
> 
> I have an XML file of track data with a bunch of attributes
> 
> <track>
> <item uniqueTrackId="1000000" albumId="12" trackId="1" genreId="13" 
> artistId="6584">
> ...
> </track>
> 
> i use this code to execute the filtering on the data, the name is artistId 
> and the value is 6584, so the data should come back with all the artists with 
> artistId 6584. 
> 
> var filterData : XMLList = _trackData.item;
>                                       
> for each (var prop : Object in _propertiesList)
> {
> filterData = filterData.(attribute(prop.name) == prop.value);
> }
> 
> but i keep getting this exception, when its applyin the filter, so within the 
> for loop 
> 
> TypeError: Error #1006: value is not a function.
> 
> So anyone that can figure what the problem is, would be a big help Thank You 
> 
> 
> Stephen Chan
>


Reply via email to