You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/04/17 04:49:15 UTC
[jira] [Updated] (FLEX-14316) mx.core.UITextField.truncateToFit()
contains dead code
[ 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