Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
Adobe Flex SDK Previous
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
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.