You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by al...@apache.org on 2021/03/09 09:19:26 UTC
[royale-asjs] branch develop updated: commit for issue in emulation
MenuBar https://github.com/apache/royale-asjs/issues/1088
This is an automated email from the ASF dual-hosted git repository.
alinakazi 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 99e3e38 commit for issue in emulation MenuBar https://github.com/apache/royale-asjs/issues/1088
99e3e38 is described below
commit 99e3e3882074a26a85743cd2978d6d03f46460f4
Author: alinakazi <al...@gmail.com>
AuthorDate: Tue Mar 9 14:19:13 2021 +0500
commit for issue in emulation MenuBar https://github.com/apache/royale-asjs/issues/1088
---
.../src/main/royale/mx/core/UIComponent.as | 50 ++++++++++------------
1 file changed, 23 insertions(+), 27 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 da46b89..a2b4644 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -3687,63 +3687,66 @@ COMPILE::JS
/**
* @private
+ * @royaleignorecoercion mx.core.IUIComponent
*/
[SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent", returns="flash.display.DisplayObject"))]
COMPILE::SWF
{ override }
public function addChild(child:IUIComponent):IUIComponent
{
- addElement(child);
- return child;
+ return addElement(child) as IUIComponent;
}
public function $uibase_addChild(child:IUIComponent):IUIComponent
{
// this should avoid calls to addingChild/childAdded
- super.addElement(child);
- return child;
+ var ret:IUIComponent = super.addElement(child) as IUIComponent;
+ return ret;
}
/**
* @private
+ * @royaleignorecoercion mx.core.IUIComponent
*/
[SWFOverride(params="flash.display.DisplayObject,int", altparams="mx.core.UIComponent,int", returns="flash.display.DisplayObject"))]
COMPILE::SWF
{ override }
- public function addChildAt(child:IUIComponent, index:int):IUIComponent
+ public function addChildAt(child:IUIComponent,
+ index:int):IUIComponent
{
- addElementAt(child, index);
- return child;
+ return addElementAt(child, index) as IUIComponent;
}
- public function $uibase_addChildAt(child:IUIComponent, index:int):IUIComponent
+ public function $uibase_addChildAt(child:IUIComponent,
+ index:int):IUIComponent
{
+ var ret:IUIComponent;
// this should avoid calls to addingChild/childAdded
if (index >= super.numElements)
- super.addElement(child);
+ ret = super.addElement(child) as IUIComponent;
else
- super.addElementAt(child, index);
- return child;
+ ret = super.addElementAt(child, index) as IUIComponent;
+ return ret;
}
/**
* @private
+ * @royaleignorecoercion mx.core.IUIComponent
*/
[SWFOverride(params="flash.display.DisplayObject", altparams="mx.core.UIComponent", returns="flash.display.DisplayObject"))]
COMPILE::SWF
{ override }
public function removeChild(child:IUIComponent):IUIComponent
{
- removeElement(child)
- return child;
+ return removeElement(child) as IUIComponent;
}
public function $uibase_removeChild(child:IUIComponent):IUIComponent
{
// this should probably call the removingChild/childRemoved
- super.removeElement(child);
- return child;
+ var ret:IUIComponent = super.removeElement(child) as IUIComponent;
+ return ret;
}
COMPILE::JS
@@ -3751,35 +3754,28 @@ COMPILE::JS
{
}
-
/**
* @private
- * @royaleemitcoercion mx.core.IUIComponent
+ * @royaleignorecoercion mx.core.IUIComponent
*/
[SWFOverride(returns="flash.display.DisplayObject"))]
COMPILE::SWF
{ override }
public function removeChildAt(index:int):IUIComponent
{
- var child:IUIComponent = getElementAt(index) as IUIComponent;
// this should probably call the removingChild/childRemoved
- removeElement(child);
- return child;
+ return removeElement(getElementAt(index)) as IUIComponent;
}
- /**
- * @royaleemitcoercion mx.core.IUIComponent
- */
public function $uibase_removeChildAt(index:int):IUIComponent
{
- var child:IUIComponent = getElementAt(index) as IUIComponent;
- super.removeElement(child);
- return child;
+ var ret:IUIComponent = super.removeElement(getElementAt(index)) as IUIComponent;
+ return ret;
}
/**
* @private
- * @royaleemitcoercion mx.core.IUIComponent
+ * @royaleignorecoercion mx.core.IUIComponent
*/
[SWFOverride(returns="flash.display.DisplayObject"))]
COMPILE::SWF