Repository: flex-asjs
Updated Branches:
  refs/heads/develop d15d58033 -> 98315b1f7


Assigns an IViewManager to an IView when the IViewManager is added to its 
parent.


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

Branch: refs/heads/develop
Commit: 37eb77de18c5045d46a8c5cdfc7283385e6b666c
Parents: d15d580
Author: Peter Ent <[email protected]>
Authored: Fri Mar 13 13:53:50 2015 -0400
Committer: Peter Ent <[email protected]>
Committed: Fri Mar 13 13:53:50 2015 -0400

----------------------------------------------------------------------
 .../src/org/apache/flex/mobile/StackedViewManager.as    | 12 +++++++++---
 .../src/org/apache/flex/mobile/TabbedViewManager.as     |  8 ++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/37eb77de/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git 
a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/StackedViewManager.as
 
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/StackedViewManager.as
index 58dd312..54f3fd1 100644
--- 
a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/StackedViewManager.as
+++ 
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/StackedViewManager.as
@@ -74,9 +74,15 @@ package org.apache.flex.mobile
                        
                        var n:int = ViewManagerModel(model).views.length;
                        if (n > 0) {
-                               var view:IView = 
ViewManagerModel(model).views[n-1] as IView;
-                               addElement(view,false);
-                               _topView = view;
+                               for (var i:int = 0; i < n; i++)
+                               {
+                                       var view:IView = 
ViewManagerModel(model).views[i] as IView;
+                                       view.viewManager = this;
+                                       if (i == (n-1)) {
+                                               addElement(view,false);
+                                               _topView = view;
+                                       }
+                               }
                        }
                }
                

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/37eb77de/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/TabbedViewManager.as
----------------------------------------------------------------------
diff --git 
a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/TabbedViewManager.as
 
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/TabbedViewManager.as
index 2c9665e..78cda35 100644
--- 
a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/TabbedViewManager.as
+++ 
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/TabbedViewManager.as
@@ -219,6 +219,14 @@ package org.apache.flex.mobile
                        
                        var n:int = ViewManagerModel(model).views.length;
                        if (n > 0) {
+                               for (var i:int = 0; i < n; i++)
+                               {
+                                       var view:IView = 
ViewManagerModel(model).views[i] as IView;
+                                       view.viewManager = this;
+                                       if (i == 0) {
+                                               addElement(view,false);
+                                       }
+                               }
                                ViewManagerModel(model).selectedIndex = 0;
                        }
                }

Reply via email to