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 5316810D27 for ; Tue, 22 Oct 2013 10:37:46 +0000 (UTC) Received: (qmail 49929 invoked by uid 500); 22 Oct 2013 10:37:45 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 49889 invoked by uid 500); 22 Oct 2013 10:37:44 -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 49876 invoked by uid 99); 22 Oct 2013 10:37:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 10:37:44 +0000 Date: Tue, 22 Oct 2013 10:37:43 +0000 (UTC) From: "Alexander Scheibe (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-33838) TLF ContainerController.mouseDownHandler null object reference MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-33838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Scheibe updated FLEX-33838: ------------------------------------- Description: The mouseDown handler of the flashx.textLayout.container.ContainerController may cause a null object reference error (here the code with original comments) {code} public function mouseDownHandler(event:MouseEvent):void { if (interactionManager && !event.isDefaultPrevented()) { interactionManager.mouseDownHandler(event); // grab the focus - alternative is to listen to keyevents on the Application // is this necessary? if (interactionManager.hasSelection()) setFocus(); } } {code} The error occurs in the line interactionManager.hasSelection() because interactionManager.mouseDownHandler(event) may cause the textFlow to become null and therefore the interactionManager can be null in that line. was: The mouseDown handler of the flashx.textLayout.container.ContainerController may cause a null object reference error (here the code with original comments) public function mouseDownHandler(event:MouseEvent):void { if (interactionManager && !event.isDefaultPrevented()) { interactionManager.mouseDownHandler(event); // grab the focus - alternative is to listen to keyevents on the Application // is this necessary? if (interactionManager.hasSelection()) setFocus(); } } The error occurs in the line interactionManager.hasSelection() because interactionManager.mouseDownHandler(event) may cause the textFlow to become null and therefore the interactionManager can be null in that line. > TLF ContainerController.mouseDownHandler null object reference > -------------------------------------------------------------- > > Key: FLEX-33838 > URL: https://issues.apache.org/jira/browse/FLEX-33838 > Project: Apache Flex > Issue Type: Bug > Affects Versions: Apache Flex 4.10.0 > Reporter: Alexander Scheibe > Labels: tlf > > The mouseDown handler of the flashx.textLayout.container.ContainerController may cause a null object reference error > (here the code with original comments) > {code} > public function mouseDownHandler(event:MouseEvent):void > { > if (interactionManager && !event.isDefaultPrevented()) > { > interactionManager.mouseDownHandler(event); > // grab the focus - alternative is to listen to keyevents on the Application > // is this necessary? > if (interactionManager.hasSelection()) > setFocus(); > } > } > {code} > The error occurs in the line interactionManager.hasSelection() because interactionManager.mouseDownHandler(event) may cause the textFlow to become null and therefore the interactionManager can be null in that line. -- This message was sent by Atlassian JIRA (v6.1#6144)