0 Replies Latest reply on Jan 6, 2012 12:54 AM by pigmyfinch

    Managing child collection propery changes

    pigmyfinch

      I'm new to Flex and need help with managing child collection property changes, specifically notifying a parent object that a property within the child collection has changed.

       

      package
      {

           [Bindable]
           public class Author
           {
                public var firstName:String;
                public var lastName:String;

                public var books:ArrayCollection;

       

                public function get dateOfFirstBookPublished():Date

                {

                     if (books != null) {

                          return books[0].datePublished;

                     }

                     return null;

                }    

           }

      }

       

       

      package
      {

           [Bindable]
           public class Book
           {
                public var name:String;
                public var datePublished:Date;

           }

      }

       

      How can I notify the Author when a Book propery has changed and update the dateOfFirstBookPublished method? Any assistance is appreciated.