flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Mazuruk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34355) ActiveWindowManager, findHighestModalForm issue
Date Thu, 18 Dec 2014 15:41:13 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14251816#comment-14251816
] 

Alexander Mazuruk commented on FLEX-34355:
------------------------------------------

Once again:

That is not a PopupManager case at all. We are talking about this sample from ActiveWindowManager:
private function findHighestModalForm():int
{
var index:int = rc.getChildIndex(f as DisplayObject); // You perfectly know that this call
will throw an exception if unsuccessful, right?
// ok, IChildList interface has .contains() method, what is the purpose for this method at
all? If you are not using it to pre-check child existence.
// Let's mind logically, if you insist that calling .contains() will degrade performance,
let's remove this method away from IChildList, why we should have it there if it's slow and
useless?
if (index > 0)
{
}

And yes, we could do everything ourselves, including monkey patching and full code rewriting(due
to total private stuff), why do we need solid SDK at all? lets invent wheels independently
:)

> ActiveWindowManager, findHighestModalForm issue
> -----------------------------------------------
>
>                 Key: FLEX-34355
>                 URL: https://issues.apache.org/jira/browse/FLEX-34355
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: .Unspecified - Framework, Runtime Exceptions
>    Affects Versions: Apache Flex 4.12.0, Apache Flex 4.13.0
>            Reporter: Alexander Mazuruk
>            Assignee: Alex Harui
>
> We have a lot of modal messageBoxes popped out on the stage, and we are trying to close
them one by one, and for the second closed dialog we are facing this issue. Modal form was
removed from the stage faster than mouseClickhandler from SystemManager was called actually.
> IChildList interface has .contains() method, Why in the world you are not using it?
> This code fragment must be fixed:
> 	private function findHighestModalForm():int
> 	{
> /////////////////////////////////////////
> 				var index:int = rc.getChildIndex(f as DisplayObject);
> 				if (index > 0)
> 				{
> 				}
> /////////////////////////////////////////
> 	}
> As follows:
> 	private function findHighestModalForm():int
> 	{
> /////////////////////////////////////////
> 	var index:int = rc.contains(f as DisplayObject) ? rc.getChildIndex(f as DisplayObject)
: -1;
> 				if (index > 0)
> 				{
> 				}
> /////////////////////////////////////////
> 	}
> Otherwise we have this error pops out when we don't have a child in the IChildList and
code is trying to fetch it out, but it's not there already.
> ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
> 	at flash.display::DisplayObjectContainer/getChildIndex()
> 	at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_getChildIndex()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2195]
> 	at mx.managers::SystemRawChildrenList/getChildIndex()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/SystemRawChildrenList.as:189]
> 	at mx.managers.systemClasses::ActiveWindowManager/findHighestModalForm()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as:441]
> 	at mx.managers.systemClasses::ActiveWindowManager/mouseDownHandler()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as:469]
> 	at flash.events::EventDispatcher/dispatchEventFunction()
> 	at flash.events::EventDispatcher/dispatchEvent()
> 	at mx.core::UIComponent/dispatchEvent()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:13682]
> 	at mx.managers::SystemManager/mouseEventHandler()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/SystemManager.as:2926]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message