views:

29

answers:

1

I have two lists.. I need help filtering one list when an "Artist" is selected in the other..

I also want to play the next video when the "Next Video" button is selected..

Here is a link to an example with a few videos.. http://www.yourtimeisborrowed.com/bin-release/gg.html

View source is enabled so feel free to grab the code..

I will be adding a full tutorial section on how to build this app step by step using Flash Catalyst and Flash BUilder.. Thats what I'm working on now but really would love some help on this filtering issue as it's out of my league..

Anyhow, I'm not just taking, I plan on giving back in a major way..

So if the "evangalists" aren't too busy with their datagrids I'd appreciate some help showing the true power and ease of use that the Adobe Framework is capable of..

A: 

In the context of Flex, you wouldn't be filtering a list; you'd be filtering that list's dataProvider. There is a lot of code to sort through, I don't have time to try to decompile your application.

I strongly suggest that for your dataProviders, you use one of the CollectionClasses, either ArrayCollection or XMLListCollection. Then you can make use of the built in filtering.

If you google on filtering Flex Collections quite a few blog posts come up, here is one that looked solid:

http://www.devshed.com/c/a/XML/Flex-Array-Collection-Sort-and-Filtering/

Here is the Adobe docs on the same thing: http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_4.html

I think I demo this The Flex Show screecast on collection classes:

http://www.theflexshow.com/blog/index.cfm/2008/10/29/The-Flex-Show--Fifteen-Minutes-With-Flex--Episode-9--Collection-Classes

If you can provide a stripped down sample that demonstrate the problem; please update the question and let me know.

www.Flextras.com
Thanks Flextra.. Because I'm a super novice programmer things get tricky for me.. Example being, I only know how to play the selected video but using some sort of "valueobject".. When I use ArrayCollection or XMLListCollection I can't get it to work..ANyhow, I'll strip it down and post something with just the lists..Thanks
Tony
Most likely you're just referencing it wrong. With value object you can reference "vo.property' . If it's in an array collection you can reference "ac.getItemAt(0).property . If the video player thing is an itemRenderer, then your VO is passed into the data object and you can reference 'data.property'.
www.Flextras.com