<?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>kahunaburger &#187; Flex</title> <atom:link href="http://www.kahunaburger.com/category/flex/feed/" rel="self" type="application/rss+xml" /><link>http://www.kahunaburger.com</link> <description>home of pia, max, frisco and tobias</description> <lastBuildDate>Fri, 03 Feb 2012 13:50:45 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Flash Player VerifyError: Error #1014 with RSLs</title><link>http://www.kahunaburger.com/2009/04/08/flash-player-verifyerror-error-1014-with-rsls/</link> <comments>http://www.kahunaburger.com/2009/04/08/flash-player-verifyerror-error-1014-with-rsls/#comments</comments> <pubDate>Wed, 08 Apr 2009 20:38:32 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/?p=1473</guid> <description><![CDATA[This is more a note to self, but I&#8217;m sure others will run into it as well. If you just changed your Flex/Flash project to use Runtime Shared Libraries (RSLs) and launch your new, shiny and tiny application for the first time only to see the error message &#8220;VerifyError: Error #1014: Class some.package::SomeClass could not [...]]]></description> <content:encoded><![CDATA[<p>This is more a note to self, but I&#8217;m sure others will run into it as well. If you just changed your Flex/Flash project to use <a
href="http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:Flex_3_RSLs">Runtime Shared Libraries</a> (RSLs) and launch your new, shiny and tiny application for the first time only to see the error message &#8220;<b><code>VerifyError: Error #1014: Class some.package::SomeClass could not be found</code></b>&#8220;, then do not despair. Most likely you&#8217;ll just have to switch the order in which the libraries are being loaded.</p><p>If RSL A depends on RSL B, you will need to make sure that B is loaded before A, otherwise you see the message above. Go back to your flex project, hit Project properties, select &#8220;Flex Build Path&#8221;, then tab &#8220;Library path&#8221;. Rearrange the &#8220;Build path libraries&#8221; to make sure they are loaded in the right order and do a rebuild.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2009/04/08/flash-player-verifyerror-error-1014-with-rsls/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>AirLog</title><link>http://www.kahunaburger.com/2009/03/25/airlog/</link> <comments>http://www.kahunaburger.com/2009/03/25/airlog/#comments</comments> <pubDate>Wed, 25 Mar 2009 12:26:06 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[AIR]]></category> <category><![CDATA[Flex]]></category> <category><![CDATA[Photo]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/?p=1363</guid> <description><![CDATA[[ this is a repost of an old article, because for some reason the old one got all messed up and I have no idea why ] Things were so simple in the old days, when we had a single server acting as web-/application-server at the same time. In order to see what was going [...]]]></description> <content:encoded><![CDATA[<p><em>[ this is a repost of an old article, because for some reason the old one got all messed up and I have no idea why ]</em></p><p>Things were so simple in the old days, when we had a single server acting as web-/application-server at the same time. In order to see what was going on, one would just &#8220;tail&#8221; the servers log-file (for example Apache&#8217;s access_log and/or error_log) to get live information about the servers activity.</p><p>Things are not as easy these days. For one of my work projects only god knows how many individual servers are involved: web-server, application server, rendering server, conversion server, etc. To see activity on all systems involved, developers usually have multiple Terminal windows open, are logged in to multiple servers and &#8220;tail -f&#8221; logfiles in those windows. While this allows people to get a live view into the system, it makes it very difficult to correlate log-events on one system to log-events on another system. The logs are tailed independently and the information is not &#8220;interleaved&#8221;.</p><p>There are existing utilities out there that allow you to look at multiple files at the same time (most notably <a
href="http://www.vanheusden.com/multitail/">http://www.vanheusden.com/multitail/</a>), but as far as I know, there is no platform-independent one.</p><p
style="text-align: center"><img
src="http://www.kahunaburger.com/wp-content/uploads/2007/12/airlog.jpg" alt="airlog" /></p><p><span
id="more-1363"></span></p><h3>Solution</h3><p>I created an <a
href="http://www.adobe.com/go/air">AIR </a>application that allows connecting to multiple servers at the same time, listening on multiple log-files (local or remote) at the same time, color-coding information from individual log-files and interleaving the information into a single log-display.</p><p>The solution consists of two pieces: the multitail-server and the AIR client. You can skip the portion about the &#8220;Multitail server&#8221; if you only want to listen on local log files</p><h4><a
title="AirLog-Multitailserver" name="AirLog-Multitailserver"></a>Multitail server</h4><p>The first step is to identify all hosts that have valuable log-information and to expose all those logs via a tcp-socket. On a typical modern Linux system, I made the following modifications:</p><h5><a
title="AirLog-1.)/etc/services" name="AirLog-1.)/etc/services"></a>1.) /etc/services</h5><p>I added a new service called &#8220;multitail&#8221; to the /etc/services file using a non-privileged, unused port number:</p><pre class="code-java">multitail     20000/tcp</pre><h5><a
title="AirLog-2.)xinetd" name="AirLog-2.)xinetd"></a>2.) xinetd</h5><p>Our Linux servers run xinetd and I added the following file as /etc/xinted.d/multitail:</p><pre class="code-java">service multitail
{
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/local/bin/multitail
}</pre><p>Unix systems running the traditional inetd can also be modified by adding a line to /etc/inetd.conf (not shown here).</p><h5><a
title="AirLog-3.)multitailserver" name="AirLog-3.)multitailserver"></a>3.) multitail server</h5><p>After that I created the server-program (/usr/local/bin/multitail in this case) that would be executed whenever a client makes a connection to port 20000 on the particular system:</p><pre class="code-java">#!/bin/sh
echo <span class="code-quote">"logfile=app:/</span><span class="code-keyword">var</span>/log/jboss/server.log"
echo <span class="code-quote">"logfile=web:/</span><span class="code-keyword">var</span>/log/apache/access_log"
echo "logfile=err:/var/log/apache/error_log"
tail -f /<span class="code-keyword">var</span>/log/jboss/server.log /<span class="code-keyword">var</span>/log/apache/access_log /var/log/apache/error_log</pre><p>The &#8220;logfile&#8221; lines announce which log-files are being served by this instance of multitail. &#8220;app&#8221;, &#8220;web&#8221; and &#8220;err&#8221; are tags that allow the AIR application to classify the log-information that&#8217;s coming from this server instance.</p><p>After creating the /usr/local/bin/multitail file, make sure that it is executable by using &#8220;chmod +x&#8221; on it.</p><h5><a
title="AirLog-4.)SIGHUP" name="AirLog-4.)SIGHUP"></a>4.) SIGHUP</h5><p>Once the above steps are complete, make sure you send the xinetd (or inetd) process a SIGHUP (&#8220;kill -HUP &#8230;&#8221;) signal to make it reload it&#8217;s configuration and recognize the new server process.</p><h4><a
title="AirLog-AIRclient" name="AirLog-AIRclient"></a>AIR client</h4><p>The AIR client will establish a connection to the above multitail server and will parse information from the server process. In order to know which systems to connect to, an XML configuration file is used. The XML file is called &#8220;airlog.xml&#8221; and is located in the same directory where you installed the airlog-application. Let&#8217;s look at a simple example:</p><pre class="code-java">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span> ?&gt;
&lt;connections&gt;
 &lt;connection name=<span class="code-quote">"staging"</span>&gt;
 	&lt;host name=<span class="code-quote">"staging.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 &lt;/connection&gt;
&lt;/connections&gt;</pre><p>This XML-code creates a single connection called &#8220;staging&#8221;. In the AIR application UI you will find a Combo-box that lists all the defined connections and allows you to connect to one of them at a time. Based on the above XML file, you would find one entry in the Combo-box called &#8220;staging&#8221;. Upon selecting the entry and clicking on &#8220;connect&#8221;, the AIR application will make a Socket connection to name:port. It will read the first few &#8220;logfile=&#8230;&#8221; lines from the server and create an internal list of all log-files exposed by the server.</p><p>A second configuration file called &#8220;colors.xml&#8221; associates tags (lines from a certain logfile) with specific colors. Here&#8217;s an example &#8220;colors.xml&#8221; file:</p><pre class="code-java">&lt;?xml version=<span class="code-quote">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span> ?&gt;
 &lt;colors&gt;
 	&lt;color name=<span class="code-quote">"app"</span> value=<span class="code-quote">"#880000"</span>/&gt;
 	&lt;color name=<span class="code-quote">"web"</span> value=<span class="code-quote">"#000088"</span>/&gt;
 	&lt;color name=<span class="code-quote">"err"</span> value=<span class="code-quote">"#008888"</span>/&gt;
 &lt;/colors&gt;</pre><p>As log-data arrives from the server, information is color-coded (using the colors-tag) and output in the Text-area that represents the combined log.<br
/> If multiple log-servers are involved for &#8220;staging&#8221;, then multiple host-entries can be given:</p><pre class="code-java">&lt;connection name=<span class="code-quote">"staging"</span>&gt;
 	&lt;host name=<span class="code-quote">"staging1.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"staging2.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"staging3.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 &lt;/connection&gt;</pre><p>And of course, one can have multiple connection entries in the XML file as well:</p><pre class="code-java">&lt;connection name=<span class="code-quote">"local"</span>&gt;
 	&lt;host name=<span class="code-quote">"localhost"</span> port=<span class="code-quote">"20000"</span>/&gt;
 &lt;/connection&gt;
 &lt;connection name=<span class="code-quote">"staging"</span>&gt;
 	&lt;host name=<span class="code-quote">"staging1.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"staging2.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"staging3.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 &lt;/connection&gt;
 &lt;connection name=<span class="code-quote">"deployment"</span>&gt;
 	&lt;host name=<span class="code-quote">"deploy1.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"deploy2.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"deploy3.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"deploy4.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;host name=<span class="code-quote">"deploy5.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 &lt;/connection&gt;</pre><p>The above XML file would allow people to connect to three different environment called &#8220;local&#8221;, &#8220;staging&#8221; and &#8220;deployment&#8221;.</p><p>Especially for development systems, those log-files are usually not on remote systems, but are located on the developers machine directly. To avoid having to install an xinetd/inetd environment, the AIR application also knows how to listen on local filesystem resources. Consider this case:</p><pre class="code-java">&lt;connection name=<span class="code-quote">"development"</span>&gt;
 	&lt;host name=<span class="code-quote">"authentication.server.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;file name=<span class="code-quote">"app"</span> location=<span class="code-quote">"c:tmpserver.log"</span>/&gt;
 	&lt;file name=<span class="code-quote">"web"</span> location=<span class="code-quote">"c:apachelogsaccess_log"</span>/&gt;
 &lt;/connection&gt;</pre><p>This XML configuration declares one remote server for authentication logging information and two local files (in this case a Windows system) which are color-coded with the &#8220;app&#8221; and &#8220;web&#8221; tags.<br
/> Again, information from all three log-sources would be interleaved into one log-display.</p><h5><a
title="AirLog-HistoryandFollow" name="AirLog-HistoryandFollow"></a>History and Follow</h5><p>In the AIR UI you will find a history-popup. This popup allows you to specify how many log-lines you want to keep in memory. The more lines, the higher the applications memory requirements. A value of 1000 is a good tradeoff between memory-consumption and time-span covered by the history items (that is unless one of your servers creates 200-lines stacktraces every few seconds).</p><p>The &#8220;follow&#8221; option allows you to always scroll to the bottom in the Text-area when new log-lines arrive (very much like &#8220;tail -f&#8221; in a Terminal window).</p><h5><a
title="AirLog-Enabling/Disabling" name="AirLog-Enabling/Disabling"></a>Enabling/Disabling &#8220;tags&#8221;</h5><p>As soon as log-data arrives in your AIR client, you will see a number of checkboxes on the right-hand side with all the tags announced via &#8220;logfile=xxxx:&#8221; or specified in name for file-entries. Sometimes you may want to concentrate only on a subset of the log-information that&#8217;s available to you. By deselecting a checkbox, you can remove the items associated with that tag from the log display. Information is still recorded, however it is suppressed as long as the checkbox is deselected.</p><p>Next to the checkbox for each tag, you&#8217;ll also find a color-picker that allows you to change colors for tags on the fly. The same applies to the background color of the Text-area. If the application detects a color change you&#8217;ll also get option to save out the new color values.</p><h5><a
title="AirLog-Filtering" name="AirLog-Filtering"></a>Filtering</h5><p>The &#8220;filter&#8221; textinput on the top allows you to narrow down information from all log files. Entering text in that textinput-field will only show log-lines from all log-files that contain the case-sensitive text entered there. Entering for example &#8220;Exception&#8221; in the textinput-field will only show all lines that contain the word &#8220;Exception&#8221;.<br
/> The AIR client also supports connection specific auto-filtering. Consider the following XML configuration fragment:</p><pre class="code-java">&lt;connection name=<span class="code-quote">"test"</span>&gt;
 	&lt;host name=<span class="code-quote">"a.host.com"</span> port=<span class="code-quote">"20000"</span>/&gt;
 	&lt;filters&gt;
 		&lt;filter name=<span class="code-quote">"file_not_found"</span> expression=<span class="code-quote">"File not found: (.*)"</span>/&gt;
 	&lt;/filters&gt;
 &lt;/connection&gt;</pre><p>If the AIR client encounters one or more connection specific filters, it will test the regular expression &#8220;expression&#8221; against all log-lines and will turn all items in capture-groups (those within parenthesis) into hyper-links. Clicking on a hyperlink in the log display will only show lines that contain that specific search term.</p><h3>Download</h3><p>The AIRlog application requires the latest AIR-runtime from Adobe Systems. Click on the links below to download the requires pieces and the AIRLog application as well.</p><p><center><iframe
src="/air/airlog.html" frameborder="0" height="200" width="400"></iframe></center></p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2009/03/25/airlog/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Flex tip: conditions like &#8216;&amp;&amp;&#8217; in MXML</title><link>http://www.kahunaburger.com/2008/10/03/flex-tip-conditions-like-in-mxml/</link> <comments>http://www.kahunaburger.com/2008/10/03/flex-tip-conditions-like-in-mxml/#comments</comments> <pubDate>Fri, 03 Oct 2008 20:36:44 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/?p=921</guid> <description><![CDATA[Consider the following little MXML snippet: &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&#62; &#60;mx:VBox x="0" y="0" height="100%" width="100%"&#62; &#60;mx:CheckBox label="Checkbox 1" id="check1"/&#62; &#60;mx:CheckBox label="Checkbox 2" id="check2"/&#62; &#60;mx:Label text="{check1.selected &#38;&#38; check2.selected? 'Both checked': 'Not both checked'}"/&#62; &#60;/mx:VBox&#62; &#60;/mx:Application&#62; We want to show the string &#8220;Both checked&#8221; in the label, if both of the checkboxes are checked, otherwise [...]]]></description> <content:encoded><![CDATA[<p>Consider the following little MXML snippet:</p><pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;
        &lt;mx:VBox x="0" y="0" height="100%" width="100%"&gt;
                &lt;mx:CheckBox label="Checkbox 1" id="check1"/&gt;
                &lt;mx:CheckBox label="Checkbox 2" id="check2"/&gt;
                &lt;mx:Label text="{check1.selected &amp;&amp; check2.selected?
                        'Both checked':
                        'Not both checked'}"/&gt;
        &lt;/mx:VBox&gt;
&lt;/mx:Application&gt;
</pre><p>We want to show the string &#8220;Both checked&#8221; in the label, if both of the checkboxes are checked, otherwise the label should show &#8220;Not both checked&#8221;. When you use the above code in Flex, it will show you the error: &#8220;The entity name must immediately follow the &#8216;&#038;&#8217; in the entity reference.&#8221;. It is complaining about the line where the &#8220;&#038;&#038;&#8221; appears.</p><p>MXML files are treated as XML files and as such the parser expects to see a symbol name after the &#8220;&#038;&#8221; character. Hence the error message.</p><p>With this in mind, we can convince Flex Builder and the mxml-compiler to still use &#8220;&#038;&#038;&#8221; as a condition, by properly escaping them, as in:</p><pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;
        &lt;mx:VBox x="0" y="0" height="100%" width="100%"&gt;
                &lt;mx:CheckBox label="Checkbox 1" id="check1"/&gt;
                &lt;mx:CheckBox label="Checkbox 2" id="check2"/&gt;
                &lt;mx:Label text="{check1.selected &amp;amp;&amp;amp; check2.selected?
                        'Both checked':
                        'Not both checked'}"/&gt;
        &lt;/mx:VBox&gt;
&lt;/mx:Application&gt;</pre><p>The above may look weird in the editor, but it compiles cleanly and does what one would expect.</p><p>The same applies to other operators: &#8220;< " should be written as "&amp;lt;" and ">&#8221; should be written as &#8220;&amp;gt;&#8221;.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2008/10/03/flex-tip-conditions-like-in-mxml/feed/</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>AIR Link Report visualizer</title><link>http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/</link> <comments>http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/#comments</comments> <pubDate>Sat, 08 Mar 2008 16:03:57 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[AIR]]></category> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/</guid> <description><![CDATA[The Flex compiler has a rarely used feature called &#8220;link-report&#8221;. Using this option instructs the compiler to create a report of all symbols that went into the compiled application as well as a list of all external references. The Reducing SWF file sizes livedocs-page has more information about link reports. To enable it, you would [...]]]></description> <content:encoded><![CDATA[<p>The <a
href="http://www.adobe.com/products/flex/">Flex</a> compiler has a rarely used feature called &#8220;link-report&#8221;. Using this option instructs the compiler to create a report of all symbols that went into the compiled application as well as a list of all external references. The <a
href="http://livedocs.adobe.com/flex/3/html/help.html?content=performance_06.html">Reducing SWF file sizes</a> livedocs-page has more information about link reports.</p><p>To enable it, you would either modify your Flex projects&#8217; compiler settings:</p><p><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-01.png' alt='link-report flex compiler settings' /></center></p><p>or you would use &#8220;-link-report output.xml&#8221; as an option on the mxmlc command line. In either case, an XML file with all definitions will be created after the compiler successfully built the SWF-file.</p><p>The contents of the link report file look like this:<br
/><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-02.png' alt='link report xml' /></center></p><p>Hmmm &#8211; not very easy to digest by just reading the file in a text-editor. <a
href="http://blog.iconara.net/2007/02/25/visualizing-mxmlcs-link-report/">Theo Hultberg over at iconara.net created an XSL-script</a> that transforms link-reports into human-readable HTML. While this is interesting, it did not give me the &#8220;big picture&#8221; for all the pieces that go into my applications.</p><p>I created an <a
href="http://www.adobe.com/go/air/">AIR</a> application which can read, digest and visualize link-report files.</p><p>After installing the LinkReportAIR application, you can use the &#8220;Browse &#8230;&#8221; button to select a link-report XML file on your system or alternatively just drag and drop an XML-file on the AIR application itself.<br
/><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-03.png' alt='link report air 1' /></center></p><p>The DataGrid on the left lists all symbols included in the report (under &#8220;id&#8221;), the modification date for the symbol (if available), the package it is included in, the size of the symbol and the optimized size (if available). You can use the DataGrid headers to sort the symbols using any of the columns.<br
/> All symbols that do not have a package associated with them are automatically assigned to a package called &#8220;global&#8221;. Any symbol that ends in &#8220;_properties&#8221; is assigned to a package called &#8220;properties&#8221;.</p><p>If you click on any of the symbols in the DataGrid, the bottom portion will show you where this symbol comes from (this can be a SWC or any of your sources) and whether is has &#8220;prerequisites&#8221; or &#8220;dependencies&#8221; associated with it (the livedocs link above has more details about these):</p><p><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-04.png' alt='link report air 2' /></center></p><p>The neatest feature of LinkReportAIR is the little treemap (using <a
href="http://www.ilog.com/products/elixir/">ILOG Elixir</a>) that is automatically created from the data in the link report. It tries to visualize the space consumption per package. In the screenshot below, I&#8217;m hovering over the &#8220;mx.controls&#8221; package (and all packages included in it) and LinkReportAIR tells me that the (unoptimized) size of everything contained under mx.controls.* is roughly 500 KBytes and that this equals about 25% of my applications total size.</p><p><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-05.png' alt='link report air treemap' /></center></p><p>Double-clicking on a package in the tree-map will &#8220;drill down&#8221; and allows you to focus on certain portions of the package tree. While &#8220;drilled down&#8221;, the DataGrid on the left will also be filtered to only show symbols in the current drilled down subtree. To get back to the entire view, you would double-click again on the subtree-symbol that is currently in focus (sounds complicated, but you&#8217;ll get it once you use it).</p><p>And finally the &#8220;External Symbols&#8221; tab will show all symbols that are externally required (like the stuff that&#8217;s exported from the Flash Player itself). That list will grow if you decide to link the Flex Framework externally via Runtime Shared Libraries (RSLs):</p><p><center><img
src='http://www.kahunaburger.com/wp-content/uploads/linkreportair-06.png' alt='link report air external' /></center></p><p>You can download and install the AIR application using the badge below. If you need a sample link-report file to play with, then use the one that I generated from the application itself: <a
href="http://www.kahunaburger.com/air/LinkReportAIR/link-report.xml">link-report.xml</a> (use &#8220;Save Link As &#8230;&#8221; to save the report locally)</p><p><center><iframe
src="/air/LinkReportAIR/LinkReportAIR.html" frameborder="0" height="300" width="300"></iframe></center></p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2008/03/08/air-link-report-visualizer/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Flare &#8211; data visualization in Flex</title><link>http://www.kahunaburger.com/2008/01/16/flare-data-visualization-in-flex/</link> <comments>http://www.kahunaburger.com/2008/01/16/flare-data-visualization-in-flex/#comments</comments> <pubDate>Wed, 16 Jan 2008 19:22:17 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2008/01/16/flare-data-visualization-in-flex/</guid> <description><![CDATA[Over at http://flare.prefuse.org/ there&#8217;s an interesting collection of ActionScript libraries for Data Visualization. Take a look at the demo to see what Flare is capable of. Going to take a closer look at it when I have some spare time &#8230;]]></description> <content:encoded><![CDATA[<p><img
src="http://www.kahunaburger.com/wp-content/images/flare-logo.gif" width="129" height="45" alt="flare logo" title="flare logo" align="right" vspace="5" hspace="5"/>Over at <a
href="http://flare.prefuse.org/">http://flare.prefuse.org/</a> there&#8217;s an interesting collection of ActionScript libraries for Data Visualization. Take a look at the <a
href="http://flare.prefuse.org/demo">demo</a> to see what  Flare is capable of.</p><p>Going to take a closer look at it when I have some spare time &#8230;</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2008/01/16/flare-data-visualization-in-flex/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Flex uploads via http/https</title><link>http://www.kahunaburger.com/2007/10/31/flex-uploads-via-httphttps/</link> <comments>http://www.kahunaburger.com/2007/10/31/flex-uploads-via-httphttps/#comments</comments> <pubDate>Wed, 31 Oct 2007 14:31:00 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2007/10/31/flex-uploads-via-httphttps/</guid> <description><![CDATA[I heard that quite a number of people have issues when it comes to uploading file-content from a Flex application to a server. This is especially true if the upload happens as part of a &#8220;session&#8221;, meaning a user is authenticated and each HTTP request carries a sessionid back to the server. That sessionid is [...]]]></description> <content:encoded><![CDATA[<p>I heard that quite a number of people have issues when it comes to uploading file-content from a Flex application to a server. This is especially true if the upload happens as part of a &#8220;session&#8221;, meaning a user is authenticated and each HTTP request carries a sessionid back to the server. That sessionid is usually transported in form of a cookie.</p><p>So why do things break when trying to do uploads from Flex, especially when using Firefox? The explanation is pretty simple: when you select a file for upload (using <code>FileReference.browse()</code> and <code>FileReference.upload()</code> &#8211; see here for a discussion about <a
href="http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001936.html">&#8220;Working with file upload and download&#8221;</a>) and then send that selected file to the server, Firefox uses two different processes. The first one is the one that hosts your Flex (Flash) application and communicates with the server on one channel. The second one is the actual file-upload process that pipes multipart-mime data to the server. And, unfortunately, those two processes do <em>not</em> share cookies. So any sessionid-cookie that was established in the first channel is not being transported to the server in the second channel. This means that the server upload code cannot associate the posted data with an active session and rejects the data, thus failing the upload.</p><p>To fix this we need to make sure that we transport all the necessary information with the upload URL allowing the server to associate the uploaded data with an active session.</p><p>It has been suggested elsewhere, like <a
href="http://thanksmister.com/?p=59">here</a> or <a
href="http://www.mail-archive.com/flexcoders@yahoogroups.com/msg58372.html">here</a> to just tackle on the sessionid to the URLs used for the upload. That will work, but moves logic from the server into the client and I don&#8217;t like that. What if the sessionid-parameter gets changed on the server? What if a different server application is receiving the upload-data? In both cases you will need to make modifications to the client as well. You have an unnecessary dependency between client and server.</p><p>For a recent project we used a different approach: our flex application communicates via remoting calls with the server (we use Flex Data Services in this case). When a user is about to upload a file to the server, the Flex-application will issue a call <code>getUserUploadURL(...)</code>. The receiving java-servlet will construct a one-time usable URL that encodes the users sessionid and a secret into the URL. The flex-code will in turn use that URL when the <code>FileReference.upload()</code> is executed. Once the server has received the data-stream for the current upload, the same URL cannot be used for subsequent uploads, instead the flex code has to ask for another url via <code>getUserUploadURL(...)</code>.</p><p>And on the server side the upload-code makes sure that no cookies are considered, but only the contents of the URL are used to figure out which session the uploaded data belongs to.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2007/10/31/flex-uploads-via-httphttps/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Adobe &#8220;SHARE beta&#8221;: the cat&#8217;s out of the bag &#8230;</title><link>http://www.kahunaburger.com/2007/10/01/adobe-share-beta-the-cats-out-of-the-bag/</link> <comments>http://www.kahunaburger.com/2007/10/01/adobe-share-beta-the-cats-out-of-the-bag/#comments</comments> <pubDate>Mon, 01 Oct 2007 20:00:18 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <category><![CDATA[News]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2007/10/01/adobe-share-beta-the-cats-out-of-the-bag/</guid> <description><![CDATA[For the past few months I&#8217;ve been working on the front-end of the Adobe SHARE (beta) service. &#8220;Front-end&#8221; here means the Flex-code that makes up the stuff you see in your browser and that connects to the back-end service that does the heavy-lifting. Almost every action in the user-interface sends a message back to the [...]]]></description> <content:encoded><![CDATA[<p>For the past few months I&#8217;ve been working on the front-end of the Adobe <a
href="http://share.adobe.com/">SHARE (beta)</a> service. &#8220;Front-end&#8221; here means the <a
href="'http://www.adobe.com/products/flex/">Flex-code</a> that makes up the stuff you see in your browser and that connects to the back-end service that does the heavy-lifting. Almost every action in the user-interface sends a message back to the server with instructions on what to do with the user-supplied data.</p><p>The service (along with the <a
href="http://www.adobe.com/special/buzzword/faq.html">&#8220;Virtual Ubiquity&#8221; Buzzword acquisition</a>) was announced at this year&#8217;s <a
href="http://www.adobemax2007/">Adobe MAX conference</a> in Chicago.</p><p>&#8220;Adobe SHARE beta&#8221; is a web-service that allows you to send &#8220;documents&#8221; to a number of recipients. You can pick whether you want to have those recipients as the only recipients or whether it is allowed to re-share the documents. 1 GB of free storage should be enough to get you going. Besides pushing (email) data to your recipients, you can also upload documents to the service and embed a preview of the document on your own web-site/blog.</p><p><center><img
src="http://www.kahunaburger.com/wp-content/images/2007-10-01-share.gif" width="491" height="314" alt="Adobe "SHARE beta"" title="Adobe "SHARE beta"" /></center></p><p>The Flex-UI allows us to add some distinct value: you can preview a (growing) number of document-formats right in your browser. This allows you to figure out whether it&#8217;s worth to download a document.</p><p>There were tons of features that were cut from the application before it&#8217;s public release and we are planning to (re-)add those before we reach the 1.0-milestone of the service.</p><p>Give it a try and let me know what you think.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2007/10/01/adobe-share-beta-the-cats-out-of-the-bag/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>The simFluence : Deep Linking Flex Applications Presentation at 360Flex</title><link>http://www.kahunaburger.com/2007/08/14/the-simfluence-deep-linking-flex-applications-presentation-at-360flex/</link> <comments>http://www.kahunaburger.com/2007/08/14/the-simfluence-deep-linking-flex-applications-presentation-at-360flex/#comments</comments> <pubDate>Tue, 14 Aug 2007 20:23:46 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2007/08/14/the-simfluence-deep-linking-flex-applications-presentation-at-360flex/</guid> <description><![CDATA[There&#8217;s an interesting article/presentation over at: The simFluence : Deep Linking Flex Applications Presentation at 360Flex. It talks about how to implement deep-linking for your Flex apps. Traditionally moving from state to state in a Flex application, does not update the associated browser URL and hitting &#8220;back&#8221; and then &#8220;forward&#8221; will not bring you to [...]]]></description> <content:encoded><![CDATA[<p>There&#8217;s an interesting article/presentation over at: <a
href="http://blog.simb.net/articles/2007/08/13/deep-linking-flex-applications-presentation-at-360flex">The simFluence : Deep Linking Flex Applications Presentation at 360Flex</a>.</p><p>It talks about how to implement deep-linking for your Flex apps. Traditionally moving from state to state in a Flex application, does not update the associated browser URL and hitting &#8220;back&#8221; and then &#8220;forward&#8221; will not bring you to the exact same state in the Flex UI, instead the application will be reinitialized. Using the ExternalInterface API you can now update the browser&#8217;s URL to match the state of your Flex application. This means that one can &#8220;bookmark&#8221; interesting spots deep inside the Flex application and can return to that bookmarked location later on.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2007/08/14/the-simfluence-deep-linking-flex-applications-presentation-at-360flex/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Flex: Stopping event propagation from itemRenderers</title><link>http://www.kahunaburger.com/2007/07/24/flex-stopping-event-propagation-from-itemrenderers/</link> <comments>http://www.kahunaburger.com/2007/07/24/flex-stopping-event-propagation-from-itemrenderers/#comments</comments> <pubDate>Tue, 24 Jul 2007 21:58:50 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2007/07/24/flex-stopping-event-propagation-from-itemrenderers/</guid> <description><![CDATA[My application uses an mx:TileList to display some thumbnail and document information. I created a custom itemRenderer to display the individual tiles. The itemRenderer also uses MOUSE_OVER and MOUSE_OUT events to display a menu under the thumbnail. You move the mouse over the item, the menu appears &#8211; you move out and the menu disappears. [...]]]></description> <content:encoded><![CDATA[<p>My application uses an <a
href="http://livedocs.adobe.com/flex/2/langref/mx/controls/TileList.html">mx:TileList</a> to display some thumbnail and document information. I created a custom itemRenderer to display the individual tiles. The itemRenderer also uses MOUSE_OVER and MOUSE_OUT events to display a menu under the thumbnail. You move the mouse over the item, the menu appears &#8211; you move out and the menu disappears. Here&#8217;s a quick screen-shot where the mouse is currently over the right item:</p><p><center><img
src="http://www.kahunaburger.com/wp-content/images/2007-07-24-dc2.gif" width="421" height="286" alt="TileList with custom itemRenderer" title="TileList with custom itemRenderer" /></center></p><p>My problem was that whenever I clicked on one of the menu items (the four icons at the bottom of the right tile), the mouse event would not only execute the action associated with the menu-item, no, the event would propagate up the chain and would result in the current tile being selected as well. Not good &#8211; this has to stop.</p><p>Initially my menu-item event handler, which was triggered via &#8220;click=&#8217;menuItemClicked(event)&#8217;&#8221; was calling event.stopPropagation(), but that did not seem to do the trick. The menu-action was performed, but the TileList item was still receiving event, which resulted in the selection of the current Tile-item.<br
/> After some googling I finally found the solution: besides the &#8220;click&#8221; event I needed to trap the MOUSE_DOWN event as well. So inside my itemRenderer&#8217;s creationComplete handler I call:</p><div
class="code"> private function onCreationComplete() : void<br
/> {<br
/> this.addEventListener(MouseEvent.MOUSE_DOWN, disablePropagation);<br
/> }</div><p>And inside the disablePropagation event handler I say:</p><div
class="code"> private function disablePropagation(event : MouseEvent) : void<br
/> {<br
/> event.stopPropagation();<br
/> }</div><p>And this says: if you receive a MOUSE_DOWN event on the itemRenderer, call disablePropagation and for each such MOUSE_DOWN event, make sure that nothing else but the itemRenderer&#8217;s MOUSE_DOWN event handler(s) are called.</p><p>Works just fine!</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2007/07/24/flex-stopping-event-propagation-from-itemrenderers/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Flex tip: make your UIComponents announce themselves</title><link>http://www.kahunaburger.com/2007/07/17/flex-tip-make-your-uicomponents-announce-themselves/</link> <comments>http://www.kahunaburger.com/2007/07/17/flex-tip-make-your-uicomponents-announce-themselves/#comments</comments> <pubDate>Tue, 17 Jul 2007 19:49:57 +0000</pubDate> <dc:creator>Tobias</dc:creator> <category><![CDATA[Flex]]></category> <guid
isPermaLink="false">http://www.kahunaburger.com/2007/07/17/flex-tip-make-your-uicomponents-announce-themselves/</guid> <description><![CDATA[I work a lot with]]></description> <content:encoded><![CDATA[<p>I work a lot with <a
href=""http://www.adobe.com/products/flex/">Adobe&#8217;s Flex</a> these days. The more I use it, the more I like it.</p><p>Here&#8217;s a neat little trick for those of you who also use Flex: Every single UI element is styled via entries in a global CSS file and the UI elements pick the correct style via &#8220;styleName&#8221; properties. So, inside the CSS, you&#8217;ll find tons of sections like this one:</p><div
class="code">.dc2HeaderDocument<br
/> {<br
/> font-weight:bold;<br
/> color:#339933;<br
/> font-size:21;<br
/> }</div><p>And that <code>dc2HeaderDocument</code> is used as a styleName on some UI element. Just recently a UI designer started to work on the CSS-file to make it compliant with the design-document. But how the heck is he supposed to know which UI element uses which style? That would require looking through the *.as/*.mxml sources and identifying the correct relationship between source and presentation.</p><p>After some fiddling today I came up with a much more elegant solution to this problem.</p><p>In my main mx:Application I register an event handler for the &#8220;added&#8221; event. The docs say that this event is dispatched &#8220;when a display object is added to the display list&#8221;. Inside the event handler I check if the added object is a sub-class of UIComponent and if it is the case, then I set the UIComponent&#8217;s toolTip property to the UIComponent&#8217;s styleName property. This means that every single item that is added to the stage will get a toolTip that represents the styleName used for the UIComponent. Just hover over an item and it will identify itself.</p><p>Here&#8217;s what I had to do:</p><div
class="code">&lt;mx:Application &#8230;. added=&#8221;displayObjectAdded(event)&#8221; &#8230;.&gt;<br
/> &#8230;<br
/> public function displayObjectAdded(event : Event) : void<br
/> {<br
/> &nbsp;if(event.target is UIComponent) {<br
/> &nbsp;&nbsp;event.target.toolTip =<br
/> &nbsp;&nbsp;&nbsp;event.target.styleName?event.target.styleName:&#8221;no style&#8221;;<br
/> &nbsp;}<br
/> }</div><p>Now UI designer loads the Flex application, hovers over the item that needs to be fixed and immediately knows what CSS-entry to change.</p> ]]></content:encoded> <wfw:commentRss>http://www.kahunaburger.com/2007/07/17/flex-tip-make-your-uicomponents-announce-themselves/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
