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

carlosrovira 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 05f546e  jewel-moduleloader: add autoload, so you users can load a 
module
05f546e is described below

commit 05f546ed5580b7f311489198fa7849a1a6683b88
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Jun 19 21:30:43 2019 +0200

    jewel-moduleloader: add autoload, so you users can load a module
---
 .../royale/org/apache/royale/jewel/ModuleLoader.as  | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ModuleLoader.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ModuleLoader.as
index 83e1c72..e5e172b 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ModuleLoader.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ModuleLoader.as
@@ -77,7 +77,6 @@ package org.apache.royale.jewel
         {
             return utils.modulePath;
         }
-        
         /**
          *  @private.
          */
@@ -90,17 +89,29 @@ package org.apache.royale.jewel
         {
             return utils.moduleName;
         }
-        
         public function set moduleName(value:String):void
         {
             utils.moduleName = value;
         }
-                
+
+        private var _autoLoad:Boolean = true;    
+        /**
+         *  @private.
+         */
+        public function set autoLoad(value:Boolean):void
+        {
+            _autoLoad = value;
+        }
+        public function get autoLoad():Boolean
+        {
+            return _autoLoad;
+        }
+
         override public function addedToParent():void
         {
             super.addedToParent();
-            // if (utils.moduleName)
-            //     loadModule();
+            if (_autoLoad && utils.moduleName)
+                loadModule();
         }
                
         private var utils:UIModuleUtils = new UIModuleUtils();

Reply via email to