royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] branch develop updated: attempt to pass parameters to application
Date Fri, 26 Oct 2018 06:38:39 GMT
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


The following commit(s) were added to refs/heads/develop by this push:
     new d94cdae  attempt to pass parameters to application
d94cdae is described below

commit d94cdae3a05265085587a3eae20fd0074cc46776
Author: Alex Harui <aharui@apache.org>
AuthorDate: Thu Oct 25 23:38:24 2018 -0700

    attempt to pass parameters to application
---
 .../MXRoyale/src/main/royale/mx/managers/SystemManager.as        | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
index db464e6..9fe17c6 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -2939,7 +2939,7 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
      *  The JavaScript entry point.
      */
     COMPILE::JS
-    public function start():void
+    public function start(parameters:Object = null):void
     {
         var body:HTMLElement = document.getElementsByTagName('body')[0];
         body.appendChild(element);
@@ -2955,6 +2955,10 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
                 mixinList[i].init(this);
             }
         }
+        if (!SystemManagerGlobals.info)
+            SystemManagerGlobals.info = info();
+        if (!SystemManagerGlobals.parameters)
+            SystemManagerGlobals.parameters = parameters;
         initializeTopLevelWindow(null);
     }
     
@@ -2966,6 +2970,9 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
     private function initializeTopLevelWindow(event:Event):void
     {
         component = IUIComponent(create());
+        if (SystemManagerGlobals.parameters)
+            component["parameters"] = SystemManagerGlobals.parameters;
+        
         // until preloader?
         component.addEventListener("applicationComplete", applicationCompleteHandler);
         addChild(component as IUIComponent);


Mime
View raw message