<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Colin Harrington &#187; Flex</title>
	<atom:link href="http://colinharrington.net/blog/category/ria/flex-ria/feed/" rel="self" type="application/rss+xml" />
	<link>http://colinharrington.net/blog</link>
	<description>Technologist, Consultant, Software Engineer, Entrepreneur and Musician</description>
	<lastBuildDate>Tue, 06 Jul 2010 21:50:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MacOSX :: FlexBuilder + symbolic links = badness</title>
		<link>http://colinharrington.net/blog/2008/08/macosx-flexbuilder-symbolic-links-badness/</link>
		<comments>http://colinharrington.net/blog/2008/08/macosx-flexbuilder-symbolic-links-badness/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 23:25:48 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Flex Builder]]></category>

		<guid isPermaLink="false">http://colinharrington.net/blog/index.php/2008/08/30/macosx-flexbuilder-symbolic-links-badness/</guid>
		<description><![CDATA[At work I use the FlexBuilder as an eclipse plugin.&#160; I&#8217;m a fan of eclipse so far, it has served me well in the past for Java development.
I tried using symbolic links (ln &#8211;s, also called symlinks or soft-links) to manage switching between branches, etc.&#160; Flex Builder didn&#8217;t like that.&#160; 
I didn&#8217;t have any source [...]]]></description>
			<content:encoded><![CDATA[<p><img vspace="4" hspace="4" border="0" align="right" src="http://www.colinharrington.net/images/flex_logo-150x150.png" alt="Flex" />At work I use the FlexBuilder as an eclipse plugin.&nbsp; I&#8217;m a fan of eclipse so far, it has served me well in the past for Java development.</p>
<p>I tried using <a href="http://en.wikipedia.org/wiki/Symbolic_link">symbolic links</a> (ln &ndash;s, also called symlinks or soft-links) to manage switching between branches, etc.&nbsp; <i>Flex Builder didn&rsquo;t like that.</i>&nbsp; <br />
I didn&rsquo;t have any source attachment, I had to do a clean to actually rebuild the application, and other badness (Eclipse resource exceptions).</p>
<p>for example:<br />
<code>machine-name% <b>ln -s project-trunk project</b><br />
machine-name% ls -lha<br />
...<br />
lrwxr-xr-x&nbsp;&nbsp; 1 username&nbsp; DOMAIN\users &nbsp;&nbsp; 12B Jul 15 15:35 <b>project -&gt; project-trunk</b><br />
drwxr-xr-x&nbsp;&nbsp; 2 username&nbsp; DOMAIN\users&nbsp;&nbsp;&nbsp; 68B Jul 15 15:35 project-1.2.3<br />
drwxr-xr-x&nbsp;&nbsp; 2 username&nbsp; DOMAIN\users&nbsp;&nbsp;&nbsp; 68B Jul 15 15:35 project-trunk</code></p>
<h3>What did I learn?&nbsp; <u><strong>Don&#8217;t use symbolic links with Flex Builder 3.</strong>0</u>.</h3>
<p>Hope It saves someone some pain.&nbsp; I&rsquo;d guess something in the middle(OS Layer? Eclipse?) is actually walking the symlink inconsistently.&nbsp; No resolution to this issue yet.&nbsp; Is this the responsibility of the OS? Eclipse, Multi-platform code?&nbsp; Let me know if you see a fix for this.</p>
<p>While I&#8217;m at it &#8212; I also ran into this one <a href="http://bugs.adobe.com/jira/browse/FBE-186">http://bugs.adobe.com/jira/browse/FBE-186</a></p>
]]></content:encoded>
			<wfw:commentRss>http://colinharrington.net/blog/2008/08/macosx-flexbuilder-symbolic-links-badness/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex Builder 3.0 Debugging issue &#8211; Unable to debug</title>
		<link>http://colinharrington.net/blog/2008/08/flex-builder-30-debugging-issue-unable-to-debug/</link>
		<comments>http://colinharrington.net/blog/2008/08/flex-builder-30-debugging-issue-unable-to-debug/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 03:40:28 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[syslogd]]></category>

		<guid isPermaLink="false">http://colinharrington.net/blog/index.php/2008/08/19/flex-builder-30-debugging-issue-unable-to-debug/</guid>
		<description><![CDATA[I recently ran into an issue where Flex Builder 3.0 wouldn&#8217;t let me debug and caused my whole System (OSX) to grind to a halt.&#160; It took me a while to get to the bottom of it, but I found the issue and addressed it.&#160;
Basically Eclipse had this error &#8211;over and over and over and [...]]]></description>
			<content:encoded><![CDATA[<p><img vspace="4" hspace="4" align="right" alt="Flex" src="http://www.colinharrington.net/images/flex_logo-150x150.png" />I recently ran into an issue where Flex Builder 3.0 wouldn&#8217;t let me debug and caused my whole System (OSX) to grind to a halt.&nbsp; It took me a while to get to the bottom of it, but I found the issue and addressed it.&nbsp;</p>
<p>Basically Eclipse had this error &ndash;over and over and over and ove&#8230;100+MB worth <img src='http://colinharrington.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  in the system.log <br />
<span style="font-size: small;"><code>Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !ENTRY com.adobe.flexbuilder.debug 4 2 2008-08-07 15:21:31.716<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !MESSAGE Problems occurred when invoking code from plug-in: &quot;com.adobe.flexbuilder.debug&quot;.<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: !STACK 0<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]: java.lang.NullPointerException<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.findSourceFiles(FlexLineBreakpoint.java:388)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.breakpoints.FlexLineBreakpoint.instantiate(FlexLineBreakpoint.java:442)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget.breakpointAdded(FlexDebugTarget.java:889)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.installDeferredBreakpoints(FlexDebugTarget.java:539)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.advanceStateMachine(FlexDebugTarget.java:570)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.access$6(FlexDebugTarget.java:544)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$1.run(FlexDebugTarget.java:646)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.core.runtime.Platform.run(Platform.java:857)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.eventLoop(FlexDebugTarget.java:626)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at com.adobe.flexbuilder.debug.model.FlexDebugTarget$FdbThread.run(FlexDebugTarget.java:687)<br />
Aug 17 15:21:31 machine-name [0x0-0xc30c3].org.eclipse.eclipse[8730]:&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.Thread.run(Thread.java:613)</code></span></p>
<p>A little googling turned up <a href="http://www.fingersdancing.net/2008/06/flex-debugger-crashing-eclipse-safari.html">this article</a> where the guy points to a setting in the mm.cfg.&nbsp; Issue resolved?&nbsp; Not so fast.&nbsp; My issue had similar symptoms but was not identical.&nbsp; After some trial and error I figured out that I had been building the SWFs in two different fasions: <a href="http://ant.apache.org/">via ant</a> and with Flex Builder.&nbsp; So it turns out that Flex Builder was finding the SWFs built by my build files and going into a recurring <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html">NPE</a> fit.&nbsp; Flex Builder basically inundated the system.log to the point of no return.&nbsp; I could have waited for 2 days, but I chose to manually rotate the log myself (which took some googling to turn up the right solution).</p>
<p>Hopefully Flex Builder 3.0 has fixed this.</p>
<p><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;"><b>Symptoms:<br />
</b>Flex Builder hangs when setting a breakpoint (can&rsquo;t debug &ndash; Eclipse and the system goes &lsquo;out-to-lunch&rsquo;)</p>
<p><b>Solution:<br />
</b></span></font></p>
<ul>
<li><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">Remove the duplicate swf&rsquo;s or profiling versions</span></font><span style="font-size: 11pt;"><font face="Calibri, Verdana, Helvetica, Arial"><br />
    </font></span></li>
</ul>
<ul>
<li><span style="font-size: 11pt;"><font face="Calibri, Verdana, Helvetica, Arial">Your machine still out to lunch? (syslogd) &nbsp;&nbsp;Then you will have to manually rotate your system log, since its too much for syslogd to handle. <br />
    </font></span></li>
</ul>
<blockquote><p><span style="font-size: 11pt;"><font face="Courier New">sudo launchctl stop com.apple.syslogd &amp;&amp; sudo mv /private/var/log/system.log ~/system.log.NPEFilled &amp;&amp; sudo launchctl start com.apple.syslogd<br />
</font><font face="Calibri, Verdana, Helvetica, Arial">(Stop syslogd, move the system.log file, start syslogd)<br />
</font></span></p></blockquote>
<ul>
<li><span style="font-size: 11pt;"><font face="Calibri, Verdana, Helvetica, Arial">Happy Debugging!<br />
    </font></span></li>
</ul>
<p><span style="font-size: 11pt;"><span style="font-size: 11pt;"><font face="Calibri, Verdana, Helvetica, Arial"><br />
</font></span></span>  <span style="font-size: 11pt;"><font face="Calibri, Verdana, Helvetica, Arial"><b>Reasoning:<br />
</b>Flex Builder goes into a flurry of recurring java.lang.<wbr></wbr>NullPointerExceptions when trying to resolve the source attachment when there are multiple versions of the same swf. &nbsp;You won&rsquo;t be able to debug or set a breakpoint. &nbsp;If you do, Your system log will be overloaded because of the massive onslaught of NPEs reported by Eclipse/Flex Builder. &nbsp;Syslogd tried to rotate the system log but it is just too large for it to handle after you&rsquo;d let the recurring NPEs go on for a minute, so manually rotating the log seems like a good solution (got a better one?) </p>
<p>
</font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://colinharrington.net/blog/2008/08/flex-builder-30-debugging-issue-unable-to-debug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex doesn&#8217;t have a String#replaceAll()?</title>
		<link>http://colinharrington.net/blog/2008/07/flex-doesnt-have-a-stringreplaceall/</link>
		<comments>http://colinharrington.net/blog/2008/07/flex-doesnt-have-a-stringreplaceall/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 03:04:15 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://colinharrington.net/blog/index.php/2008/07/15/flex-doesnt-have-a-stringreplaceall/</guid>
		<description><![CDATA[What?!?&#160; I was shocked to learn that the latest Flex framework / Actionscript doesn&#8217;t have an equivalent for a replaceAll() on String.&#160; I&#8217;m looking for a simple way to do replacements on a string.&#160; Most of the languages that I&#8217;ve worked with have such a method or a library to provide that functionality.&#160; PHP has [...]]]></description>
			<content:encoded><![CDATA[<p><img hspace="4" align="left" style="padding: 4px;" alt="Flex Logo on White" src="http://www.colinharrington.net/images/flex_logo-150x150.png" />What?!?&nbsp; I was shocked to learn that the latest <a href="http://livedocs.adobe.com/flex/3/langref/index.html">Flex framework</a> / Actionscript doesn&#8217;t have an equivalent for a replaceAll() on <a href="http://livedocs.adobe.com/flex/3/langref/String.html">String</a>.&nbsp; I&#8217;m looking for a simple way to do replacements on a string.&nbsp; Most of the languages that I&#8217;ve worked with have such a method or a library to provide that functionality.&nbsp; <a href="http://www.php.net">PHP</a> has the <a href="http://us.php.net/str_replace">str_replace</a> function, Java<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)"> has a replaceAll()</a> on <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html">java.lang.String</a>, Python <a href="http://docs.hp.com/en/5992-3874/apas07.html">has it</a>, C++ has <a href="http://www.elcel.com/docs/opentop/API/ot/StringUtils.html">libraries that readily provide this functionality</a>, the <a href="http://msdn.microsoft.com/en-us/library/system.string.aspx">System.String</a> in the .NET framework(1.0,1.1,2.0, etc.) has a <a href="http://msdn.microsoft.com/en-us/library/system.string.replace.aspx">string#replace</a> method, even in the RIA space, Silverlight has a <a href="http://msdn.microsoft.com/en-us/library/system.string.replace(VS.95).aspx">replace method on System.String</a>, as does JavaFX (java.lang.String).</p>
<p>After searching and reading for a while, the closest equivalent that I could find is a custom method that utilizes the split and join functionality like the following:</p>
<p><code>public static function StringReplaceAll( source:String, find:String, replacement:String ) : String<br />
{<br />
&nbsp;&nbsp;&nbsp; return source.split( find ).join( replacement );<br />
}</code></p>
<p>The preceding function came from Base64.as from <a href="http://blog.jasonnussbaum.com/?p=108">Jason Nussbaum&#8217;s blog post about Base64 encoding/decoding</a>. &nbsp; Others have used similar functionality like <a href="http://flexfanatic.wordpress.com/2007/03/17/flex-str_replace-function/">this post on flexfanatic</a>. Its definitely better than while loop.</p>
<p>I also found that it is possible to utilize a <a href="http://livedocs.adobe.com/flex/3/langref/RegExp.html">RegExp</a> within the <a href="http://livedocs.adobe.com/flex/3/langref/String.html#replace()">String#replace</a> function <a href="http://www.scribbleit.co.uk/blog/?p=24">as shown on SCRIBBLE IT</a>.&nbsp; Basically the code would look like:</p>
<p><code>var str:string = &quot;Somesilly String. silly!&quot;;<br />
str.replace(new RegEx(&quot;silly&quot;, &quot;g&quot;) &quot; awesome&quot;);</code></p>
<p>With this pattern it can still be a one-liner, which should preform better than the split/join methodology, but I am still shocked that such a standard method isn&#8217;t in the framework.&nbsp; I am a bit surprised by this finding.&nbsp; is there a better way?&nbsp; A good StringUtil Library or something similar?</p>
]]></content:encoded>
			<wfw:commentRss>http://colinharrington.net/blog/2008/07/flex-doesnt-have-a-stringreplaceall/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
