Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9865AF074 for ; Wed, 17 Apr 2013 02:49:16 +0000 (UTC) Received: (qmail 84083 invoked by uid 500); 17 Apr 2013 02:49:15 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 84053 invoked by uid 500); 17 Apr 2013 02:49:15 -0000 Mailing-List: contact dev-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 dev@flex.apache.org Received: (qmail 84044 invoked by uid 99); 17 Apr 2013 02:49:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Apr 2013 02:49:15 +0000 Date: Wed, 17 Apr 2013 02:49:15 +0000 (UTC) From: "Justin Mclean (JIRA)" To: dev@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-14316) mx.core.UITextField.truncateToFit() contains dead code 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-14316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Mclean updated FLEX-14316: --------------------------------- Labels: easyfix (was: ) > mx.core.UITextField.truncateToFit() contains dead code > ------------------------------------------------------ > > Key: FLEX-14316 > URL: https://issues.apache.org/jira/browse/FLEX-14316 > Project: Apache Flex > Issue Type: Bug > Components: mx: Label > Affects Versions: Adobe Flex SDK Previous > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Priority: Trivial > Labels: easyfix > > The truncateToFit() method contains a line of dead code. The results of originalText.slice() are not assigned anywhere. > if (originalText != "" && textWidth + TEXT_WIDTH_PADDING > w + 0.00000000000001) > { > // This should get us into the ballpark. > var s:String = super.text = originalText; > originalText.slice(0, > Math.floor((w / (textWidth + TEXT_WIDTH_PADDING)) * originalText.length)); > while (s.length > 1 && textWidth + TEXT_WIDTH_PADDING > w) > { > s = s.slice(0, -1); > super.text = s + truncationIndicator; > } > > return true; > } > So maybe the AS3 compiler is optimizing this out, but the code should be removed/commented out from the SDK. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira