You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/08/14 06:02:17 UTC

[royale-asjs] 02/08: propagate systemManager property

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit f62ff36f089609531e6ada68fe79e8fd0df562fd
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 16:26:51 2019 -0700

    propagate systemManager property
---
 .../projects/MXRoyale/src/main/royale/mx/core/UIComponent.as       | 3 +++
 .../projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as  | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index fb1d8aa..ec5c4fd 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1727,6 +1727,9 @@ public class UIComponent extends UIBase
     public function get systemManager():ISystemManager
     {
         // TODO
+        if (_systemManager == null && parent != null && parent is UIComponent)
+            _systemManager = (parent as UIComponent).systemManager;
+        
         return _systemManager;
     }
 
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
index 7a8f480..d85b92c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/PopUpManager.as
@@ -23,16 +23,17 @@ package mx.managers
 //import flash.display.DisplayObject;
 //import mx.core.IFlexModuleFactory;
 //import mx.core.Singleton;
+import mx.core.FlexGlobals;
 import mx.core.IFlexDisplayObject;
 import mx.core.IUIComponent;
-import mx.core.FlexGlobals;
+import mx.core.UIComponent;
 
 import org.apache.royale.core.IChild;
 import org.apache.royale.core.IPopUpHost;
 import org.apache.royale.core.IStrand;
 import org.apache.royale.core.IUIBase;
 import org.apache.royale.html.beads.plugin.IModalDisplay;
-import org.apache.royale.utils.UIUtils;
+import org.apache.royale.utils.UIUtils;
 
 
 /**
@@ -204,6 +205,8 @@ public class PopUpManager
             if (modalBead)
                 modalBead.show(popUpHost);
         }
+        if (popUpHost is UIComponent)
+            (window as UIComponent).systemManager = (popUpHost as UIComponent).systemManager;
         popUpHost.popUpParent.addElement(window as IUIComponent);
     }