views:

118

answers:

2

hello,

As ArrayCollection in Flex is limited, I'm looking for a data-structure that something like LinkedHashSet in Java, LinkedHashSet maintains a doubly-linked list running through all of its entries,it defines the iteration ordering, which is the order in which elements were inserted into the set (insertion-order).But there is little information about Flex data-structure, so anyone can help me, thanks

A: 

Hi there,

Check out Michael Baczynski's AS3 Data Structures For Game Developers library, it's likely the best example you'll find in AS3. There is a doubly-linked list implementation there. (Which you can just use if you want, rather than implementing your own)

http://lab.polygonal.de/ds/

Tyler Egeto
@Tyler. Any framework can use in ComboBox and DataGrid
jason
+1  A: 

This library might be worth checking:

http://sibirjak.com/blog/index.php/collections/as3commons-collections/

Also, check this question for suggestions on other libraries.

Juan Pablo Califano
No hashes in AS3CC, unfortunately.
Gunslinger47
thanks, It is very useful, but have a problem, when I use the collection in this framework, for example, use LinkedSet as dataProvider in Combobox, but can't work, because in Flex, only thoseimplements ICollectionView can use as dataProvider
jason
@jason. No problem. I work with Actionsctip on a daily basis, but I'm afraid my knowledge of Flex is superficial, so the only idea that comes to mind is having this class implement the interface (monkey-patching, sounds bad) or using composition. But I don't know much about the specifics, possible gotchas, etc. So I think you're better off a) editing your question to add this or b) asking a new question with this specific problem, so people that know more about Flex can suggest what's the best way to go (probably the best option).
Juan Pablo Califano
@Juan. Thanks for your help.
jason