<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Setting word wrapping on the Spark TextArea control in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7185</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 06 Mar 2010 03:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7185</guid>
		<description>I believe this is data binding, you&#039;re just binding to a static string (&quot;\n&quot;). I think it gets treated by the compiler differently, or is causing it to get set by ActionScript in the internals of the Flex architecture (but what do I know, that may all be wrong).
I read through each of those 5 bugs, and the best explanation is given in &lt;a href=&quot;http://bugs.adobe.com/jira/browse/SDK-11469&quot; rel=&quot;nofollow&quot;&gt;SDK-11469&lt;/a&gt; and there is an additional workaround given in &lt;a href=&quot;http://bugs.adobe.com/jira/browse/SDK-12649&quot; rel=&quot;nofollow&quot;&gt;SDK-12649&lt;/a&gt;. And actually, another simple workaround for this is to set the &lt;code&gt;text&lt;/code&gt; property via ActionScript instead of directly in MXML. It may also be marginally better performance wise, then using some binding to the static &quot;\n&quot; string. But yes, I do believe this is a compiler issue where it is seeing a &quot;\n&quot; and escaping the backslash so it gets preserved. Based on the 5 bugs, I was never 100% certain whether it was a bug or fact of life or what, but I definitely think it is a usability issue since it seems to be coming up again and again by internal and external people. I&#039;m hoping that we can get http://bugs.adobe.com/jira/browse/SDK-12649 investigated by a current member of the compiler team to get a definitive answer on what the problem and solution (if any) is, but for now, it seems like the various workarounds work.

If you want to see what is happening within Flex, it should be relatively easy to add the -keep compiler option to a simple &quot;hello\nworld&quot; test case and see what the generated code is.

Peter</description>
		<content:encoded><![CDATA[<p>I believe this is data binding, you&#8217;re just binding to a static string (&#8220;\n&#8221;). I think it gets treated by the compiler differently, or is causing it to get set by ActionScript in the internals of the Flex architecture (but what do I know, that may all be wrong).<br />
I read through each of those 5 bugs, and the best explanation is given in <a href="http://bugs.adobe.com/jira/browse/SDK-11469" rel="nofollow">SDK-11469</a> and there is an additional workaround given in <a href="http://bugs.adobe.com/jira/browse/SDK-12649" rel="nofollow">SDK-12649</a>. And actually, another simple workaround for this is to set the <code>text</code> property via ActionScript instead of directly in MXML. It may also be marginally better performance wise, then using some binding to the static &#8220;\n&#8221; string. But yes, I do believe this is a compiler issue where it is seeing a &#8220;\n&#8221; and escaping the backslash so it gets preserved. Based on the 5 bugs, I was never 100% certain whether it was a bug or fact of life or what, but I definitely think it is a usability issue since it seems to be coming up again and again by internal and external people. I&#8217;m hoping that we can get <a href="http://bugs.adobe.com/jira/browse/SDK-12649" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-12649</a> investigated by a current member of the compiler team to get a definitive answer on what the problem and solution (if any) is, but for now, it seems like the various workarounds work.</p>
<p>If you want to see what is happening within Flex, it should be relatively easy to add the -keep compiler option to a simple &#8220;hello\nworld&#8221; test case and see what the generated code is.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Borodin</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7184</link>
		<dc:creator>Igor Borodin</dc:creator>
		<pubDate>Sat, 06 Mar 2010 03:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7184</guid>
		<description>Dear Peter, 
Thank you so much. Both syntaxes work, and that&#039;s what matters most (at least at the moment). I&#039;ll add my vote for fixing the problem. 
Just mater of curiosity: where could I find the explanations of why binding (this is not actual binding, is it?) to an escape character works?
Igor</description>
		<content:encoded><![CDATA[<p>Dear Peter,<br />
Thank you so much. Both syntaxes work, and that&#8217;s what matters most (at least at the moment). I&#8217;ll add my vote for fixing the problem.<br />
Just mater of curiosity: where could I find the explanations of why binding (this is not actual binding, is it?) to an escape character works?<br />
Igor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7183</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 06 Mar 2010 02:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7183</guid>
		<description>Well, I found at least 4 versions of this reported in JIRA. I believe the last one (SDK-12649) is the bug I was remembering:

http://bugs.adobe.com/jira/browse/SDK-266 - &quot;Can&#039;t insert newline in text without using htmlText&quot;
http://bugs.adobe.com/jira/browse/SDK-1352 - &quot;need a way to insert a newline character in MXML String values&quot;
http://bugs.adobe.com/jira/browse/SDK-8963 - &quot;textarea component \n \r does not work&quot;
http://bugs.adobe.com/jira/browse/SDK-11469 - &quot;Line breaks don&#039;t work from attribute text, but works for AS and Binding. Should be consistent.&quot;
http://bugs.adobe.com/jira/browse/SDK-12649 - &quot;Erratic behavior in line break display&quot;

Feel free to vote for all those bugs in JIRA so Adobe knows this issue is important to you and we can prioritize our bugs accordingly.

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>Well, I found at least 4 versions of this reported in JIRA. I believe the last one (SDK-12649) is the bug I was remembering:</p>
<p><a href="http://bugs.adobe.com/jira/browse/SDK-266" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-266</a> &#8211; &#8220;Can&#8217;t insert newline in text without using htmlText&#8221;<br />
<a href="http://bugs.adobe.com/jira/browse/SDK-1352" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-1352</a> &#8211; &#8220;need a way to insert a newline character in MXML String values&#8221;<br />
<a href="http://bugs.adobe.com/jira/browse/SDK-8963" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-8963</a> &#8211; &#8220;textarea component \n \r does not work&#8221;<br />
<a href="http://bugs.adobe.com/jira/browse/SDK-11469" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-11469</a> &#8211; &#8220;Line breaks don&#8217;t work from attribute text, but works for AS and Binding. Should be consistent.&#8221;<br />
<a href="http://bugs.adobe.com/jira/browse/SDK-12649" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-12649</a> &#8211; &#8220;Erratic behavior in line break display&#8221;</p>
<p>Feel free to vote for all those bugs in JIRA so Adobe knows this issue is important to you and we can prioritize our bugs accordingly.</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7182</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 06 Mar 2010 01:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7182</guid>
		<description>This also seems to work:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
               xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
               xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;&gt;
    
    &lt;s:Label text=&quot;First line&#013;Second line&quot; /&gt;
    
&lt;/s:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>This also seems to work:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">               xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">               xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;First line&amp;#13;Second line&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7181</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 06 Mar 2010 01:45:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7181</guid>
		<description>@Igor,

You need to wrap the &quot;\n&quot; with data binding:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
               xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
               xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;&gt;
    
    &lt;s:Label text=&quot;First line{&#039;\n&#039;}Second line&quot; /&gt;
    
&lt;/s:Application&gt;
&lt;/pre&gt;

I&#039;ll see if I can find the SDK/compiler bug for this. I think there was another workaround.

Peter</description>
		<content:encoded><![CDATA[<p>@Igor,</p>
<p>You need to wrap the &#8220;\n&#8221; with data binding:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">               xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">               xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;First line{'\n'}Second line&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>I&#8217;ll see if I can find the SDK/compiler bug for this. I think there was another workaround.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Borodin</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-7180</link>
		<dc:creator>Igor Borodin</dc:creator>
		<pubDate>Sat, 06 Mar 2010 01:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-7180</guid>
		<description>Hello Peter.

Could you clarify for me one question: the escape character - &#039;\n&#039; - does break the line of text in ActionScript block, but I&#039;d like to use the multiline property of Spark Label to break the lines of text as I need it within MXML. Something like this: 
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;s:Label text=&quot;First line \n Second line&quot; /&gt;
&lt;/pre&gt;

Whether I put it with preceding &#039;\&#039; or plainly or wrap it in single quotes I just see it faithfully reproduced as a text. Managing this with &#039;width&#039; of a Label, or constraints like &#039;left&#039; or &#039;right&#039; is rather inconvenient.

Thanks,
Igor</description>
		<content:encoded><![CDATA[<p>Hello Peter.</p>
<p>Could you clarify for me one question: the escape character &#8211; &#8216;\n&#8217; &#8211; does break the line of text in ActionScript block, but I&#8217;d like to use the multiline property of Spark Label to break the lines of text as I need it within MXML. Something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;First line \n Second line&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>Whether I put it with preceding &#8216;\&#8217; or plainly or wrap it in single quotes I just see it faithfully reproduced as a text. Managing this with &#8216;width&#8217; of a Label, or constraints like &#8216;left&#8217; or &#8216;right&#8217; is rather inconvenient.</p>
<p>Thanks,<br />
Igor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-4116</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sun, 10 May 2009 15:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-4116</guid>
		<description>Example(s) updated to work with Flex SDK 4.0.0.6731.</description>
		<content:encoded><![CDATA[<p>Example(s) updated to work with Flex SDK 4.0.0.6731.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/comment-page-1/#comment-4117</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Thu, 16 Apr 2009 18:46:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2009/02/04/setting-word-wrapping-on-the-fxtextarea-control-in-flex-gumbo/#comment-4117</guid>
		<description>Hi,

I&#039;ve tried this example in flexbuilder build 3.0.205647 with flex gumbo build 4.0.0.4904
and it didn&#039;t work.
I linked the flashplayer 10 swc in the project&#039;s flex build path.
It compiled fine but when i opened it in the browser it doesn&#039;t display anything.
I right clicked in the window and the flash player is there.
What am i missing?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve tried this example in flexbuilder build 3.0.205647 with flex gumbo build 4.0.0.4904<br />
and it didn&#8217;t work.<br />
I linked the flashplayer 10 swc in the project&#8217;s flex build path.<br />
It compiled fine but when i opened it in the browser it doesn&#8217;t display anything.<br />
I right clicked in the window and the flash player is there.<br />
What am i missing?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

