Repository: flex-sdk
Updated Branches:
  refs/heads/FLEX-34283 e780eaa81 -> 053f8619c


Update to XMLListCollection.  Added docs to XMLListAdapter to better represent 
what is happening.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/053f8619
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/053f8619
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/053f8619

Branch: refs/heads/FLEX-34283
Commit: 053f8619cd5647b867f04a19d9afe797eaccd58f
Parents: e780eaa
Author: Nick Kwiatkowski <[email protected]>
Authored: Tue May 20 14:43:29 2014 -0400
Committer: Nick Kwiatkowski <[email protected]>
Committed: Tue May 20 14:43:29 2014 -0400

----------------------------------------------------------------------
 .../projects/framework/src/mx/collections/XMLListAdapter.as | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/053f8619/frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/XMLListAdapter.as 
b/frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
index 7c29798..5f87f63 100644
--- a/frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
+++ b/frameworks/projects/framework/src/mx/collections/XMLListAdapter.as
@@ -215,7 +215,10 @@ public class XMLListAdapter extends EventDispatcher 
implements IList, IXMLNotifi
     /**
      *  Add the item at the specified index.  Any item that was after
      *  this index is moved out by one.  If the list is shorter than 
-     *  the specified index it will grow to accomodate the new item.
+     *  the specified index it will grow to accommodate the new item.
+     *
+     *  The source array may change, and changes made to it may not be
+     *  tracked after this operation if you access it directly.
      * 
      *  @param item the item to place at the index
      *  @param index the index at which to place the item
@@ -246,6 +249,10 @@ public class XMLListAdapter extends EventDispatcher 
implements IList, IXMLNotifi
                
                setBusy();
 
+        // Replace the current source XMLList with a new list in order to add
+        // the item to the list.  This is needed to maintain the structure of
+        // the new item added to the list and avoid an FP bug.
+
                if (length > 0)
                {
             var newSource:XMLList = new XMLList();

Reply via email to