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:15 UTC

[royale-asjs] branch develop updated (2798153 -> afe77af)

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

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


    from 2798153  Jewel CheckBoxValidator: Fix issue where validator added directly to checkbox doesn't work
     new e99789f  try using visibility instead of display=none so that offsetParent and offsetWidth/Height evaluate to something
     new f62ff36  propagate systemManager property
     new 08d7e91  handle measuredWidth without measuring non-UIComponent renderers
     new bd65f3a  RichTextEditor was using embeds and throwing exceptions.  Probably a TODO around getting the assets into the output folders.  Fixed #439
     new 8c947c9  change UIComponent.component to UIComponent.mxmlDocument and get it to work better.  Fixes #440
     new 2b04c20  setters cannot assume that mxmlDocument is set because they can get set before the component is added to the document
     new a0cfda8  set mxmldocument as early as possible
     new afe77af  don't assume you are the mxmldocument.  It will get set elsewhere

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/config/compile-js-config.xml          |  33 +++++++-
 .../src/main/config/compile-swf-config.xml         |  32 ++++++++
 .../src/main/resources/assets/divider_vertical.png | Bin 27229 -> 27186 bytes
 .../main/resources}/assets/icon_align_center.png   | Bin
 .../main/resources}/assets/icon_align_justify.png  | Bin
 .../src/main/resources}/assets/icon_align_left.png | Bin
 .../main/resources}/assets/icon_align_right.png    | Bin
 .../src/main/resources}/assets/icon_bullet.png     | Bin
 .../src/main/resources}/assets/icon_style_bold.png | Bin
 .../main/resources}/assets/icon_style_italic.png   | Bin
 .../resources}/assets/icon_style_underline.png     | Bin
 .../src/main/royale/mx/controls/RadioButton.as     |   7 +-
 .../main/royale/mx/controls/RichTextEditor.mxml    |  16 ++--
 .../src/main/royale/mx/controls/ToggleButtonBar.as |  26 ++++++-
 .../MXRoyale/src/main/royale/mx/core/Container.as  |   6 +-
 .../src/main/royale/mx/core/IUIComponent.as        |   4 +-
 .../src/main/royale/mx/core/UIComponent.as         |  85 ++++++++++++++-------
 .../src/main/royale/mx/managers/ISystemManager.as  |   4 +-
 .../src/main/royale/mx/managers/PopUpManager.as    |   7 +-
 .../src/main/royale/mx/managers/SystemManager.as   |  28 +++----
 .../royale/spark/components/SkinnableContainer.as  |   3 -
 .../spark/components/supportClasses/GroupBase.as   |   3 -
 22 files changed, 184 insertions(+), 70 deletions(-)
 copy examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar/assets/icon_style_italic.png => frameworks/projects/MXRoyale/src/main/resources/assets/divider_vertical.png (68%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_align_center.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_align_justify.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_align_left.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_align_right.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_bullet.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_style_bold.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_style_italic.png (100%)
 copy {examples/mxroyale/tourdeflexmodules/src/spark/tlf/textEditBar => frameworks/projects/MXRoyale/src/main/resources}/assets/icon_style_underline.png (100%)


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

Posted by ah...@apache.org.
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);
     }
 	


[royale-asjs] 06/08: setters cannot assume that mxmlDocument is set because they can get set before the component is added to the document

Posted by ah...@apache.org.
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 2b04c203a6ca7afe4ac008b898df8e315fb5d8d5
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 20:11:19 2019 -0700

    setters cannot assume that mxmlDocument is set because they can get set before the component is added to the document
---
 .../projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
index 46ab092..36fca0f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
@@ -282,7 +282,8 @@ public class RadioButton extends Button
         {
             (rbicon.element as HTMLInputElement).checked = value;
         }
-        group.setSelection(this, false);
+        if (group != null)
+            group.setSelection(this, false);
         dispatchEvent(new Event("selectedChanged"));
     }    
     
@@ -314,7 +315,7 @@ public class RadioButton extends Button
      */
     public function get group():RadioButtonGroup
     {
-        if (_group == null)
+        if (_group == null && mxmlDocument != null)
         {
             _group = mxmlDocument[groupName];
         }


[royale-asjs] 03/08: handle measuredWidth without measuring non-UIComponent renderers

Posted by ah...@apache.org.
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 08d7e91a114b5d97ae9462e2d4b13c5a25d178ac
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 16:28:56 2019 -0700

    handle measuredWidth without measuring non-UIComponent renderers
---
 .../src/main/royale/mx/controls/ToggleButtonBar.as | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ToggleButtonBar.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ToggleButtonBar.as
index a64e0a9..ac4d190 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ToggleButtonBar.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ToggleButtonBar.as
@@ -90,7 +90,7 @@ import org.apache.royale.core.ILayoutHost;
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="buttonWidth", type="Number", format="Length", inherit="no")]
+//[Style(name="buttonWidth", type="Number", format="Length", inherit="no")]
 
 
 	
@@ -447,6 +447,30 @@ public class ToggleButtonBar extends UIComponent implements ILayoutParent, ILayo
         dispatchEvent(new Event("initComplete"));
     }
 
+    private var _buttonWidth:int;
+    
+    public function get buttonWidth():int
+    {
+        return _buttonWidth;
+    }
+    public function set buttonWidth(value:int):void
+    {
+        _buttonWidth = value;
+    }
+    
+    override public function get measuredWidth():Number
+    {
+        if (dataProvider)
+            return buttonWidth * dataProvider.length;
+        return 0;
+    }
+    
+    override public function get measuredHeight():Number
+    {
+        if (dataProvider)
+            return height; // do a better measurement someday
+        return 0;
+    }
 }
 
 }


[royale-asjs] 05/08: change UIComponent.component to UIComponent.mxmlDocument and get it to work better. Fixes #440

Posted by ah...@apache.org.
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 8c947c91b9e50129a676cc54be601d0b45dc3048
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 17:27:23 2019 -0700

    change UIComponent.component to UIComponent.mxmlDocument and get it to work better.  Fixes #440
---
 .../src/main/royale/mx/controls/RadioButton.as     |  2 +-
 .../MXRoyale/src/main/royale/mx/core/Container.as  |  3 +-
 .../src/main/royale/mx/core/IUIComponent.as        |  4 +-
 .../src/main/royale/mx/core/UIComponent.as         | 52 +++++++++++-----------
 .../src/main/royale/mx/managers/ISystemManager.as  |  4 +-
 .../src/main/royale/mx/managers/SystemManager.as   | 28 ++++++------
 .../royale/spark/components/SkinnableContainer.as  |  2 +-
 .../spark/components/supportClasses/GroupBase.as   |  2 +-
 8 files changed, 48 insertions(+), 49 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
index 4c19e74..46ab092 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RadioButton.as
@@ -316,7 +316,7 @@ public class RadioButton extends Button
     {
         if (_group == null)
         {
-            _group = component[groupName];
+            _group = mxmlDocument[groupName];
         }
         return _group;
     }
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 69a88df..1dfeb3b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -771,7 +771,6 @@ public class Container extends UIComponent
 	//--------------------------------------------------------------------------
 	
 	private var _mxmlDescriptor:Array;
-	private var _mxmlDocument:Object = this;
 	
 	override public function addedToParent():void
 	{
@@ -781,7 +780,7 @@ public class Container extends UIComponent
 		}
 		
         if (MXMLDescriptor)
-            component = this;
+            _mxmlDocument = this;
         
 		super.addedToParent();		
 		
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as
index 555dbbe..b2d7a68 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as
@@ -55,12 +55,12 @@ public interface IUIComponent extends IFlexDisplayObject, IChild, IUIBase
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function get component():Object
+    function get mxmlDocument():Object
 
     /**
      *  @private
      */
-    function set component(value:Object):void
+    function set mxmlDocument(value:Object):void
 
     //----------------------------------
     //  enabled
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 ec5c4fd..7503af4 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1847,7 +1847,7 @@ COMPILE::JS
      *  so that their 'document' property refers to the document object
      *  that they are inside.
      */
-    private var _component:Object;
+    protected var _mxmlDocument:Object;
     
     [Inspectable(environment="none")]
     
@@ -1861,9 +1861,9 @@ COMPILE::JS
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function get component():Object
+    public function get mxmlDocument():Object
     {
-        return _component;
+        return _mxmlDocument;
     }
     
     /**
@@ -1876,7 +1876,7 @@ COMPILE::JS
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function set component(value:Object):void
+    public function set mxmlDocument(value:Object):void
     {
         var n:int = numChildren;
         for (var i:int = 0; i < n; i++)
@@ -1888,14 +1888,14 @@ COMPILE::JS
             if (child == this)
                 continue;
             
-            if (child.component == _component ||
-                child.component == FlexGlobals.topLevelApplication)
+            if (child.mxmlDocument == _mxmlDocument ||
+                child.mxmlDocument == FlexGlobals.topLevelApplication)
             {
-                child.component = value;
+                child.mxmlDocument = value;
             }
         }
         
-        _component = value;
+        _mxmlDocument = value;
     }
     
     
@@ -1915,10 +1915,10 @@ COMPILE::JS
             initialized = true;
         }
 
-        if (!component && parent is UIComponent)
-            component = UIComponent(parent).component;
-        else if (!component && parent is ContainerContentArea)
-            component = UIComponent(ContainerContentArea(parent).parent).component;
+        if (!mxmlDocument && parent is UIComponent)
+            mxmlDocument = UIComponent(parent).mxmlDocument;
+        else if (!mxmlDocument && parent is ContainerContentArea)
+            mxmlDocument = UIComponent(ContainerContentArea(parent).parent).mxmlDocument;
     }
     
     //----------------------------------
@@ -1966,7 +1966,7 @@ COMPILE::JS
     {
         // Look for the SystemManager's document,
         // which should be the Application.
-        var o:Object = systemManager.component;
+        var o:Object = systemManager.mxmlDocument;
 
         // If this UIComponent is its own root, then it is an Application.
         // We want to return its parent Application, or null
@@ -1983,7 +1983,7 @@ COMPILE::JS
         if (o == this)
         {
             var p:UIComponent = o.systemManager.parent as UIComponent;
-            o = p ? p.systemManager.component : null;
+            o = p ? p.systemManager.mxmlDocument : null;
         }
 
         return o;
@@ -2015,23 +2015,23 @@ COMPILE::JS
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function get parentComponent():Object
+    public function get parentMxmlDocument():Object
     {
-        if (component == this)
+        if (mxmlDocument == this)
         {
             var p:IUIComponent = parent as IUIComponent;
             if (p)
-                return p.component;
+                return p.mxmlDocument;
 
             var sm:ISystemManager = parent as ISystemManager;
             if (sm)
-                return sm.component;
+                return sm.mxmlDocument;
 
             return null;
         }
         else
         {
-            return component;
+            return mxmlDocument;
         }
     }
 
@@ -5547,10 +5547,10 @@ COMPILE::JS
         // The document setter will recursively set it on any
         // descendants of the child that exist.
         if (child is IUIComponent &&
-            !IUIComponent(child).component)
+            !IUIComponent(child).mxmlDocument)
         {
-            IUIComponent(child).component = component ?
-                component :
+            IUIComponent(child).mxmlDocument = mxmlDocument ?
+                mxmlDocument :
                 FlexGlobals.topLevelApplication;
         }
         
@@ -5560,8 +5560,8 @@ COMPILE::JS
             if (moduleFactory != null)
                 IFlexModule(child).moduleFactory = moduleFactory;
                 
-            else if (component is IFlexModule && component.moduleFactory != null)
-                IFlexModule(child).moduleFactory = component.moduleFactory;
+            else if (mxmlDocument is IFlexModule && mxmlDocument.moduleFactory != null)
+                IFlexModule(child).moduleFactory = mxmlDocument.moduleFactory;
                 
             else if (parent is IFlexModule && IFlexModule(parent).moduleFactory != null)
                 IFlexModule(child).moduleFactory = IFlexModule(parent).moduleFactory;
@@ -5682,8 +5682,8 @@ COMPILE::JS
         {
             // only reset document if the child isn't
             // a document itself
-            if (IUIComponent(child).component != child)
-                IUIComponent(child).component = null;
+            if (IUIComponent(child).mxmlDocument != child)
+                IUIComponent(child).mxmlDocument = null;
             //IUIComponent(child).parentChanged(null);
         }
     }
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as
index a4926fa..4327efa 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as
@@ -94,12 +94,12 @@ public interface ISystemManager extends IEventDispatcher, IChildList /*, IFlexMo
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.4
      */
-    function get component():Object;
+    function get mxmlDocument():Object;
     
     /**
      *  @private
      */
-    function set component(value:Object):void;
+    function set mxmlDocument(value:Object):void;
     function get rawChildren():IChildList;
     function get numModalWindows():int;
     function set numModalWindows(value:int):void;
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 5339328..a89f7ea 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -823,9 +823,9 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
 
     /**
      *  @private
-     *  Storage for the component property.
+     *  Storage for the mxmlDocument property.
      */
-    private var _component:Object;
+    private var _mxmlDocument:Object;
 
     /**
      *  @inheritDoc
@@ -835,17 +835,17 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
      *  @playerversion AIR 1.1
      *  @productversion Royale 0.9.4
      */
-    public function get component():Object
+    public function get mxmlDocument():Object
     {
-        return _component;
+        return _mxmlDocument;
     }
 
     /**
      *  @private
      */
-    public function set component(value:Object):void
+    public function set mxmlDocument(value:Object):void
     {
-        _component = value;
+        _mxmlDocument = value;
     }
 
     //----------------------------------
@@ -2731,7 +2731,7 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
     private function kickOff():void
     {
         // already been here
-        if (component)
+        if (mxmlDocument)
             return;
 
         /*
@@ -2976,16 +2976,16 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
      */
     private function initializeTopLevelWindow(event:Event):void
     {
-        component = IUIComponent(create());
+        mxmlDocument = IUIComponent(create());
         if (SystemManagerGlobals.parameters)
-            component["parameters"] = SystemManagerGlobals.parameters;
+            mxmlDocument["parameters"] = SystemManagerGlobals.parameters;
         
         // until preloader?
-        component.addEventListener("applicationComplete", applicationCompleteHandler);
-        component.moduleFactory = this;
-        addChild(component as IUIComponent);
+        mxmlDocument.addEventListener("applicationComplete", applicationCompleteHandler);
+        mxmlDocument.moduleFactory = this;
+        addChild(mxmlDocument as IUIComponent);
         var screen:Rectangle = this.screen;
-        component.setActualSize(screen.width, screen.height);            
+        mxmlDocument.setActualSize(screen.width, screen.height);            
     }
     
     private function applicationCompleteHandler(event:Event):void
@@ -3725,7 +3725,7 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
      */
     public function get popUpHost():IPopUpHost
     {
-        return component as IPopUpHost;
+        return mxmlDocument as IPopUpHost;
     }
 	
 	// TODO is this right? Otherwise UIUtils.findPopUpHost() won't stop here.
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
index 5f8ecb4..8890b13 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
@@ -1014,7 +1014,7 @@ public class SkinnableContainer extends SkinnableComponent implements IContainer
         }
         
         if (MXMLDescriptor)
-            component = this;
+            mxmlDocument = this;
         
         super.addedToParent();		
         
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
index 48882f0..69f7d17 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
@@ -1189,7 +1189,7 @@ public class GroupBase extends UIComponent implements ILayoutParent, IContainer
         }
         
         if (MXMLDescriptor)
-            component = this;
+            mxmlDocument = this;
         
         super.addedToParent();		
         


[royale-asjs] 04/08: RichTextEditor was using embeds and throwing exceptions. Probably a TODO around getting the assets into the output folders. Fixed #439

Posted by ah...@apache.org.
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 bd65f3aed0c3956c226f5eef86baa2715df32616
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 16:29:47 2019 -0700

    RichTextEditor was using embeds and throwing exceptions.  Probably a TODO around getting the assets into the output folders.  Fixed #439
---
 .../src/main/config/compile-js-config.xml          |  33 +++++++++++++++++++--
 .../src/main/config/compile-swf-config.xml         |  32 ++++++++++++++++++++
 .../src/main/resources/assets/divider_vertical.png | Bin 0 -> 27186 bytes
 .../main/resources/assets/icon_align_center.png    | Bin 0 -> 27220 bytes
 .../main/resources/assets/icon_align_justify.png   | Bin 0 -> 27095 bytes
 .../src/main/resources/assets/icon_align_left.png  | Bin 0 -> 27210 bytes
 .../src/main/resources/assets/icon_align_right.png | Bin 0 -> 27210 bytes
 .../src/main/resources/assets/icon_bullet.png      | Bin 0 -> 27234 bytes
 .../src/main/resources/assets/icon_style_bold.png  | Bin 0 -> 27205 bytes
 .../main/resources/assets/icon_style_italic.png    | Bin 0 -> 27229 bytes
 .../main/resources/assets/icon_style_underline.png | Bin 0 -> 27197 bytes
 .../main/royale/mx/controls/RichTextEditor.mxml    |  16 +++++-----
 12 files changed, 71 insertions(+), 10 deletions(-)

diff --git a/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml b/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
index 1b48205..10b994b 100644
--- a/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/projects/MXRoyaleJS/src/main/config/compile-js-config.xml
@@ -95,10 +95,39 @@
         <name>defaults.css</name>
         <path>../../../../../../projects/MXRoyale/src/main/resources/defaults.css</path>
     </include-file>
-    
     <include-file>
+        <name>assets/icon_align_center.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_align_center.png</path>
     </include-file>
-
+    <include-file>
+        <name>assets/icon_align_justify.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_align_justify.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_align_left.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_align_left.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_align_right.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_align_right.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_bullet.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_bullet.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_bold.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_style_bold.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_italic.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_style_italic.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_underline.png</name>
+        <path>../../../../../../projects/MXRoyale/src/main/resources/assets/icon_style_underline.png</path>
+    </include-file>
+    
     <include-classes>
         <class>MXRoyaleClasses</class>
     </include-classes>
diff --git a/frameworks/projects/MXRoyale/src/main/config/compile-swf-config.xml b/frameworks/projects/MXRoyale/src/main/config/compile-swf-config.xml
index 57f3dfb..f37525c 100644
--- a/frameworks/projects/MXRoyale/src/main/config/compile-swf-config.xml
+++ b/frameworks/projects/MXRoyale/src/main/config/compile-swf-config.xml
@@ -98,6 +98,38 @@
         <name>defaults.css</name>
         <path>../resources/defaults.css</path>
     </include-file>
+    <include-file>
+        <name>assets/icon_align_center.png</name>
+        <path>../resources/assets/icon_align_center.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_align_justify.png</name>
+        <path>../resources/assets/icon_align_justify.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_align_left.png</name>
+        <path>../resources/assets/icon_align_left.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_align_right.png</name>
+        <path>../resources/assets/icon_align_right.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_bullet.png</name>
+        <path>../resources/assets/icon_bullet.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_bold.png</name>
+        <path>../resources/assets/icon_style_bold.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_italic.png</name>
+        <path>../resources/assets/icon_style_italic.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/icon_style_underline.png</name>
+        <path>../resources/assets/icon_style_underline.png</path>
+    </include-file>
 
     <include-lookup-only>true</include-lookup-only>
 
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/divider_vertical.png b/frameworks/projects/MXRoyale/src/main/resources/assets/divider_vertical.png
new file mode 100644
index 0000000..b87b3bd
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/divider_vertical.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_center.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_center.png
new file mode 100644
index 0000000..3fac48d
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_center.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_justify.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_justify.png
new file mode 100644
index 0000000..bf4a6d6
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_justify.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_left.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_left.png
new file mode 100644
index 0000000..c9f45f6
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_left.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_right.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_right.png
new file mode 100644
index 0000000..1bdcda3
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_align_right.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_bullet.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_bullet.png
new file mode 100644
index 0000000..a99e9a2
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_bullet.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_bold.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_bold.png
new file mode 100644
index 0000000..a0a71d1
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_bold.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_italic.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_italic.png
new file mode 100644
index 0000000..2d0221d
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_italic.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_underline.png b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_underline.png
new file mode 100644
index 0000000..316b2f1
Binary files /dev/null and b/frameworks/projects/MXRoyale/src/main/resources/assets/icon_style_underline.png differ
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RichTextEditor.mxml b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RichTextEditor.mxml
index 418e138..4add9d2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RichTextEditor.mxml
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/RichTextEditor.mxml
@@ -1060,15 +1060,15 @@
             <mx:HBox id="toolBar2" horizontalGap="0">
 
                 <mx:Button id="boldButton" width="20" toggle="true"
-                           icon="@Embed('assets/icon_style_bold.png')"
+                           icon="assets/icon_style_bold.png"
                            click="setTextStyles('bold', event.currentTarget.selected);" /> 
                 
                 <mx:Button id="italicButton" width="20" toggle="true"
-                           icon="@Embed('assets/icon_style_italic.png')"
+                           icon="assets/icon_style_italic.png"
                            click="setTextStyles('italic', event.currentTarget.selected);" /> 
                 
                 <mx:Button id="underlineButton" width="20" toggle="true"
-                           icon="@Embed('assets/icon_style_underline.png')"
+                           icon="assets/icon_style_underline.png"
                            click="setTextStyles('underline', event.currentTarget.selected);" /> 
 
             </mx:HBox>
@@ -1082,16 +1082,16 @@
                             itemClick="setTextStyles('align', ToggleButtonBar(event.currentTarget).dataProvider.getItemAt(ToggleButtonBar(event.currentTarget).selectedIndex).action); " >
                 <mx:dataProvider>
                     <fx:Array> 
-                        <fx:Object icon="@Embed('assets/icon_align_left.png')" action="left"/>
-                        <fx:Object icon="@Embed('assets/icon_align_center.png')" action="center"/>
-                        <fx:Object icon="@Embed('assets/icon_align_right.png')" action="right"/>
-                        <fx:Object icon="@Embed('assets/icon_align_justify.png')" action="justify"/>
+                        <fx:Object icon="assets/icon_align_left.png" action="left"/>
+                        <fx:Object icon="assets/icon_align_center.png" action="center"/>
+                        <fx:Object icon="assets/icon_align_right.png" action="right"/>
+                        <fx:Object icon="assets/icon_align_justify.png" action="justify"/>
                     </fx:Array>
                 </mx:dataProvider>
             </mx:ToggleButtonBar>
 
             <mx:Button id="bulletButton" width="20" toggle="true"
-                   icon="@Embed('assets/icon_bullet.png')"
+                   icon="assets/icon_bullet.png"
                    click="setTextStyles('bullet', event.currentTarget.selected);" /> 
 
             <mx:VRule height="{linkTextInput.height}"/>


[royale-asjs] 07/08: set mxmldocument as early as possible

Posted by ah...@apache.org.
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 a0cfda8ed031147d78205ee8004bfe0b0984293b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 20:12:34 2019 -0700

    set mxmldocument as early as possible
---
 frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 1dfeb3b..577df42 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -779,9 +779,6 @@ public class Container extends UIComponent
 			ValuesManager.valuesImpl.init(this);
 		}
 		
-        if (MXMLDescriptor)
-            _mxmlDocument = this;
-        
 		super.addedToParent();		
 		
 		// Load the layout bead if it hasn't already been loaded.
@@ -850,6 +847,8 @@ public class Container extends UIComponent
 	 */
 	public function generateMXMLAttributes(data:Array):void
 	{
+        if (!_mxmlDocument)
+            _mxmlDocument = this;
 		MXMLDataInterpreter.generateMXMLProperties(this, data);
 	}
 	


[royale-asjs] 01/08: try using visibility instead of display=none so that offsetParent and offsetWidth/Height evaluate to something

Posted by ah...@apache.org.
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 e99789fc7fb0536b9ee13954cc19614337f66f7b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 16:03:44 2019 -0700

    try using visibility instead of display=none so that offsetParent and offsetWidth/Height evaluate to something
---
 .../src/main/royale/mx/core/UIComponent.as         | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

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 484863e..fb1d8aa 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -5741,6 +5741,36 @@ COMPILE::JS
         super.removeEventListener(type, handler, opt_capture, opt_handlerScope);
     }
 
+    [Bindable("visibleChanged")]
+    COMPILE::JS
+    override public function get visible():Boolean
+    {
+        if (!positioner.style.visibility) return true;
+        
+        return positioner.style.visibility == 'visible';
+    }
+    
+    COMPILE::JS
+    override public function set visible(value:Boolean):void
+    {
+        var oldValue:Boolean = (!positioner.style.visibility) ||
+                                positioner.style.visibility == 'visible';
+        if (Boolean(value) !== oldValue)
+        {
+            if (!value) 
+            {
+                positioner.style.visibility = 'hidden';
+                dispatchEvent(new Event('hide'));
+            } 
+            else 
+            {
+                positioner.style.visibility = 'visible';
+                dispatchEvent(new Event('show'));
+            }
+            dispatchEvent(new Event('visibleChanged'));
+        }
+    }
+
 }
 
 }


[royale-asjs] 08/08: don't assume you are the mxmldocument. It will get set elsewhere

Posted by ah...@apache.org.
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 afe77af41a472262569d3d79a659eb80cdb0d274
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Aug 13 20:13:26 2019 -0700

    don't assume you are the mxmldocument.  It will get set elsewhere
---
 .../SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as | 3 ---
 .../src/main/royale/spark/components/supportClasses/GroupBase.as       | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
index 8890b13..ed771f5 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
@@ -1013,9 +1013,6 @@ public class SkinnableContainer extends SkinnableComponent implements IContainer
             ValuesManager.valuesImpl.init(this);
         }
         
-        if (MXMLDescriptor)
-            mxmlDocument = this;
-        
         super.addedToParent();		
         
         // Load the layout bead if it hasn't already been loaded.
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
index 69f7d17..2d3b3bb 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
@@ -1188,9 +1188,6 @@ public class GroupBase extends UIComponent implements ILayoutParent, IContainer
             ValuesManager.valuesImpl.init(this);
         }
         
-        if (MXMLDescriptor)
-            mxmlDocument = this;
-        
         super.addedToParent();		
         
         // Load the layout bead if it hasn't already been loaded.