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

Justin Mclean commented on FLEX-14316:
--------------------------------------

was fixed in UITextField but not in UIFTETextField
                
> 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

Reply via email to