need to dispatch childrenAdded as promised.

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

Branch: refs/heads/release0.8.0
Commit: f6bf8c69954d3979f847a1d3ffdc4aa72b3d3fb7
Parents: 48018d5
Author: Alex Harui <[email protected]>
Authored: Wed May 24 20:32:33 2017 -0700
Committer: Alex Harui <[email protected]>
Committed: Wed May 24 21:41:58 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/core/ContainerBase.as  |  4 ++++
 .../main/flex/org/apache/flex/core/GroupBase.as | 22 ++++++++++++++++++++
 2 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f6bf8c69/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/ContainerBase.as 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/ContainerBase.as
index 0dcb0e3..af3472b 100644
--- 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/ContainerBase.as
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/ContainerBase.as
@@ -109,6 +109,8 @@ package org.apache.flex.core
                        var layoutHost:ILayoutHost = view as ILayoutHost;
                        var contentView:IParent = layoutHost.contentView as 
IParent;
                        contentView.addElement(c, dispatchEvent);
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
                }
                
                /**
@@ -120,6 +122,8 @@ package org.apache.flex.core
                        var layoutHost:ILayoutHost = view as ILayoutHost;
                        var contentView:IParent = layoutHost.contentView as 
IParent;
                        contentView.addElementAt(c, index, dispatchEvent);
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
                }
                
                /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f6bf8c69/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/GroupBase.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/GroupBase.as 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/GroupBase.as
index 07859a1..3a89556 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/GroupBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/GroupBase.as
@@ -292,5 +292,27 @@ package org.apache.flex.core
             _transitions = value;   
         }
 
+               /**
+                * @private
+                */
+               COMPILE::SWF
+               override public function addElement(c:IChild, 
dispatchEvent:Boolean = true):void
+               {
+                       super.addElement(c, dispatchEvent);
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
+               }
+               
+               /**
+                * @private
+                */
+               COMPILE::SWF
+               override public function addElementAt(c:IChild, index:int, 
dispatchEvent:Boolean = true):void
+               {
+                       super.addElementAt(c, index, dispatchEvent);
+            if (dispatchEvent)
+                this.dispatchEvent(new Event("childrenAdded"));
+               }
+
     }
 }

Reply via email to