[flexcoders] ListCollectionMap

2010-06-04 Thread ilya_persky
Hi guys!

I wanna share a thing I coded recently: it is a ListCollectionMap class, that 
adds map functionality to ListCollectionView sort and filter. A lot of 
times I felt I was missing something like this, especially when using Mate 
framework where everything is controlled by flows of binding events.

ListCollectionMap can do one-to-one and one-to-many mappings and can be used in 
data binding chains along with ListCollectionView.

The quick example is:

public var dataIntegers:ArrayCollection = new ArrayCollection([1, 2, 3]); 

public var mapIntegers:ListCollectionMap = new 
ListCollectionMap(incrementMapping, dataIntegers); 

public function incrementMapping(i:int):int
{
return i + 1
}

Detailed explanation and examples are in my blog:

http://oitar.biz/blog/2010/06/04/meet-listcollectionmap/

Cheers, 
Ilya.




Re: [flexcoders] ListCollectionMap

2010-06-04 Thread Oleg Sivokon
Cool, really, thanks for sharing.
Although I didn't like the idea of extending Proxy... I think the bug where
the dataProvider is accessed in a dataProvider[i] way should've been fixed
now... There are also couple of wrong assumption that ListCollection makes
when treating data as Arrays, thus not using interfaces. But that's
definitely an edge case.