Hello,
I have an array collection of lessons and each lesson that has an array
collection of cards:
[Bindable]
public class Lesson
{
public var title:String;
public var text:String;
public var cards:ArrayCollection = new ArrayCollection();
}
[Bindable]
public class Card
{
public var question:String;
public var answer:String;
}
I'm trying to find a way to listen for the collection change events in each
lesson's card array collection.
I tried this:
for(var i:int = 0; i < lessonList.length; ++i)
{
lessonList[i].cards.addEventListener(CollectionEvent.COLLECTION_CHANGE,
cardsListChanged);
}
And this:
for each (var item:Lesson in lessonList)
{
item.cards.addEventListener(CollectionEvent.COLLECTION_CHANGE,
cardsListChanged);
}
But the events don't seem to fire.
What am I missing?
--
Alexei Vinidiktov