title: Flex nested ArrayCollections sorting
body: <p>I have an ArrayCollection nested in another one. I need to sort the child collection by a field.
  I tried the following code. It works fine for the parent collection, but does nothing for the child one.</p>
  
  <pre><code>    // The Data 
  
  public class Data
  {
    public var value:String;
    public var otherValue:String;
    public var childrenData:ArrayCollection; // An array collection containing Data objects.
  } 
  
  // The sorting function 
  
  private function sortData():void
  {
    var records:ArrayCollection() = bla bla (init the collection with some Data objects).
  
    records.sort = new Sort();
    records.sort.fields = [
      new SortField('value', true, false)
    ];
  
    for each (var data:Data in records){
      sortChildren(data);
    }
    records.refresh();   
  }
  
  private function sortChildren(data:Data):void
  {
    if (data.childrenData != null) {
      var srt:Sort = new Sort();
      srt.fields = [
        new SortField('otherValue', true, false)
      ];
      data.childrenData.sort = srt;
      data.childrenData.refresh();
    }  
  }
  </code></pre>
  
  <p>I can't figure out what I'm doing wrong, so some help would be appreciated.</p>
  
  <p>Thanks in advance,</p>