Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24EA611ED3 for ; Tue, 3 Jun 2014 12:48:02 +0000 (UTC) Received: (qmail 41017 invoked by uid 500); 3 Jun 2014 12:48:01 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 40996 invoked by uid 500); 3 Jun 2014 12:48:01 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 40920 invoked by uid 99); 3 Jun 2014 12:48:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2014 12:48:01 +0000 Date: Tue, 3 Jun 2014 12:48:01 +0000 (UTC) From: "Alexander Mazuruk (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLEX-34355) ActiveWindowManager, findHighestModalForm issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Alexander Mazuruk created FLEX-34355: ---------------------------------------- Summary: ActiveWindowManager, findHighestModalForm issue Key: FLEX-34355 URL: https://issues.apache.org/jira/browse/FLEX-34355 Project: Apache Flex Issue Type: Bug Components: .Unspecified - Framework Affects Versions: Apache Flex 4.12.0 Reporter: Alexander Mazuruk 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.2#6252)