This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch feature/MXRoyale in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 551d74e5799d0060dee4c06e2f3ae832e2ef6aba Author: Alex Harui <[email protected]> AuthorDate: Thu Mar 8 17:50:43 2018 -0800 change the 'document' property in UIComponent and elsewhere to 'component'. The 'document' property was conflicting with the browser's document object. --- .../src/main/royale/mx/core/IUIComponent.as | 6 ++-- .../src/main/royale/mx/core/UIComponent.as | 38 +++++++++++----------- .../src/main/royale/mx/managers/ISystemManager.as | 6 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) 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 9452830..fc2e3ae 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/IUIComponent.as @@ -41,7 +41,7 @@ public interface IUIComponent extends IFlexDisplayObject, IChild //-------------------------------------------------------------------------- //---------------------------------- - // document + // component (was 'document' in Flex) //---------------------------------- /** @@ -54,12 +54,12 @@ public interface IUIComponent extends IFlexDisplayObject, IChild * @playerversion AIR 1.1 * @productversion Flex 3 */ - function get document():Object + function get component():Object /** * @private */ - function set document(value:Object):void + function set component(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 ba148e3..319d77b 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as @@ -658,7 +658,7 @@ public class UIComponent extends UIBase //-------------------------------------------------------------------------- //---------------------------------- - // document + // _component (was 'document' in Flex) //---------------------------------- /** @@ -673,7 +673,7 @@ public class UIComponent extends UIBase * so that their 'document' property refers to the document object * that they are inside. */ - private var _document:Object; + private var _component:Object; [Inspectable(environment="none")] @@ -687,9 +687,9 @@ public class UIComponent extends UIBase * @playerversion AIR 1.1 * @productversion Flex 3 */ - public function get document():Object + public function get component():Object { - return _document; + return _component; } /** @@ -702,7 +702,7 @@ public class UIComponent extends UIBase * @playerversion AIR 1.1 * @productversion Flex 3 */ - public function set document(value:Object):void + public function set component(value:Object):void { var n:int = numChildren; for (var i:int = 0; i < n; i++) @@ -711,14 +711,14 @@ public class UIComponent extends UIBase if (!child) continue; - if (child.document == _document || - child.document == FlexGlobals.topLevelApplication) + if (child.component == _component || + child.component == FlexGlobals.topLevelApplication) { - child.document = value; + child.component = value; } } - _document = value; + _component = value; } //---------------------------------- @@ -766,7 +766,7 @@ public class UIComponent extends UIBase { // Look for the SystemManager's document, // which should be the Application. - var o:Object = systemManager.document; + var o:Object = systemManager.component; // If this UIComponent is its own root, then it is an Application. // We want to return its parent Application, or null @@ -783,21 +783,21 @@ public class UIComponent extends UIBase if (o == this) { var p:UIComponent = o.systemManager.parent as UIComponent; - o = p ? p.systemManager.document : null; + o = p ? p.systemManager.component : null; } return o; } //---------------------------------- - // parentDocument + // parentComponent //---------------------------------- [Bindable("initialize")] /** - * A reference to the parent document object for this UIComponent. - * A document object is a UIComponent at the top of the hierarchy + * A reference to the parent component object for this UIComponent. + * A component object is a UIComponent at the top of the hierarchy * of a Flex application, MXML component, or AS component. * * <p>For the Application object, the <code>parentDocument</code> @@ -815,23 +815,23 @@ public class UIComponent extends UIBase * @playerversion AIR 1.1 * @productversion Flex 3 */ - public function get parentDocument():Object + public function get parentComponent():Object { - if (document == this) + if (component == this) { var p:IUIComponent = parent as IUIComponent; if (p) - return p.document; + return p.component; var sm:ISystemManager = parent as ISystemManager; if (sm) - return sm.document; + return sm.component; return null; } else { - return document; + return component; } } 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 7aa7892..1d31f4c 100644 --- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as +++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/ISystemManager.as @@ -81,7 +81,7 @@ public interface ISystemManager extends IEventDispatcher, IChildList /*, IFlexMo //-------------------------------------------------------------------------- //---------------------------------- - // document + // component //---------------------------------- /** @@ -94,12 +94,12 @@ public interface ISystemManager extends IEventDispatcher, IChildList /*, IFlexMo * @playerversion AIR 1.1 * @productversion Flex 3 */ - function get document():Object; + function get component():Object; /** * @private */ - function set document(value:Object):void; + function set component(value:Object):void; //-------------------------------------------------------------------------- // -- To stop receiving notification emails like this one, please contact [email protected].
