flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curtis Aube (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34020) Null object reference when truncating RichText
Date Fri, 03 Jan 2014 00:06:51 GMT
Curtis Aube created FLEX-34020:
----------------------------------

             Summary: Null object reference when truncating RichText
                 Key: FLEX-34020
                 URL: https://issues.apache.org/jira/browse/FLEX-34020
             Project: Apache Flex
          Issue Type: Bug
          Components: Spark: RichText
    Affects Versions: Apache Flex 4.11.0, Apache Flex 4.9.0
         Environment: Windows 7 and OS X.
            Reporter: Curtis Aube
            Priority: Critical


Sometimes the RichText component gets a null object reference when truncating text.

Here is an example:
{code:ActionScript}
<?xml version="1.0" encoding="utf-8"?>
<s:Application creationComplete="creationComplete()" minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
			   xmlns:s="library://ns.adobe.com/flex/spark">
	<fx:Script>
		<![CDATA[
			import flashx.textLayout.conversion.TextConverter;
			import flashx.textLayout.elements.TextFlow;

			private function creationComplete():void
			{
				var htmlText:String = "<ul><li>This is a test of a sentence that is really
long. So long that it causes a null object reference for some reason.</li></ul>";
				htmlText += "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed volutpat neque
tellus, vitae pellentesque lectus posuere eget. Donec eget congue nisi, vel consectetur massa.
Morbi suscipit justo neque, at varius arcu imperdiet sit amet. Phasellus volutpat nulla mauris,
ac suscipit arcu condimentum vitae. Sed lobortis ligula enim, eu egestas diam congue quis.
Nullam pellentesque condimentum mi, eu tincidunt eros imperdiet elementum. In blandit risus
ac lorem tincidunt, quis sagittis felis euismod. Vestibulum justo nibh, imperdiet pharetra
iaculis vel, fermentum in dolor. Fusce ut urna pharetra, commodo felis in, rhoncus metus.
Pellentesque facilisis, tortor at feugiat dignissim, dui lectus tempor justo, ut condimentum
massa mi quis risus. Pellentesque sodales, massa ut sodales fringilla, augue dolor cursus
eros, ac pretium est nisl a eros. Etiam nec erat dapibus, scelerisque nibh et, consectetur
risus. Nullam vitae convallis leo. Aliquam sed lorem facilisis, fringilla quam ut, semper
urna. ";
				var tf:TextFlow = TextConverter.importToFlow(htmlText, TextConverter.TEXT_FIELD_HTML_FORMAT);
				rt.textFlow = tf;
			}
		]]>
	</fx:Script>
	<s:RichText id="rt" width="600" maxDisplayedLines="10"/>
</s:Application>
{code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message