<?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"
	>

<channel>
	<title>Antun's Blog</title>
	<atom:link href="http://www.antunkarlovac.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.antunkarlovac.com/blog</link>
	<description>Notes on OpenLaszlo, LZX and Rich Internet Application Development</description>
	<pubDate>Wed, 20 Jan 2010 23:48:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>opttree For OpenLaszlo 4.7</title>
		<link>http://www.antunkarlovac.com/blog/2010/01/20/opttree-for-openlaszlo-47/</link>
		<comments>http://www.antunkarlovac.com/blog/2010/01/20/opttree-for-openlaszlo-47/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 23:48:46 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=245</guid>
		<description><![CDATA[A while back, I was tasked with creating a versatile tree for OpenLaszlo that was extensible. It needed to have several features (available in different incarnations of the same base tree) for this one particular project:

It had to support checkboxes for selection, independently of normal leaf selection.
It needed to support visual tree lines.
It needed to [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I was tasked with creating a versatile tree for OpenLaszlo that was extensible. It needed to have several features (available in different incarnations of the same base tree) for this one particular project:</p>
<ul>
<li>It had to support checkboxes for selection, independently of normal leaf selection.</li>
<li>It needed to support visual tree lines.</li>
<li>It needed to support drag-and-drop both internally (i.e. from one leaf to another) and externally (i.e. to drop targets outside of the tree).</li>
<li>It needed to be easy to add icons to different nodes.</li>
<li>It had to support large datasets. The &#8220;official&#8221; OpenLaszlo tree doesn&#8217;t support any form of lazy replication, so it was impractical.</li>
</ul>
<p>I started with a version of opttree that was created by Adam Wolff (formerly of the Laszlo Foundation Classes and now of <a href="http://www.sharegrove.com">ShareGrove</a>). In the meantime, that opttree got incorporated into OpenLaszlo, although it never made it into the official component set; it&#8217;s in the incubator. (<a href="http://svn.openlaszlo.org/openlaszlo/trunk/lps/components/incubator/opttree/">Source for that opttree</a>). In order to meet the above requirements, I needed to refactor the code somewhat to have a more reusable base class (sharedtreenode), from which I could create the various incarnations (checktreenode, dragtreenode, etc.). Mine never made it into the official OpenLaszlo distribution, although it has been widely used after it was informally released on the OpenLaszlo forums.</p>
<p>Anyway, that&#8217;s the background. Here&#8217;s one incarnation (checktree) in action:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_checktree_868237344"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="/blog/wp-content/uploads/2010/01/checktree.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/blog/wp-content/uploads/2010/01/checktree.swf"
			name="fm_checktree_868237344"
			width="450"
			height="200">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>I&#8217;ve finally updated this to run on OpenLaszlo 4.7; because it wasn&#8217;t part of the official distribution, it was never kept up-to-date. You can <a href="/blog/wp-content/uploads/2010/01/opttree-openlaszlo-47.zip">download the source for my opttree</a>, complete with checktree, dragtree variants, as well as examples of how to add icons, and so forth. The test cases should give you a pretty good idea of how it&#8217;s used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2010/01/20/opttree-for-openlaszlo-47/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Most Important OpenLaszlo Application?</title>
		<link>http://www.antunkarlovac.com/blog/2010/01/19/the-most-important-openlaszlo-application/</link>
		<comments>http://www.antunkarlovac.com/blog/2010/01/19/the-most-important-openlaszlo-application/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:19:10 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<category><![CDATA[RIAs]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=239</guid>
		<description><![CDATA[I just discovered PuzzlePixies.com, which is arguably one of the most valuable and important OpenLaszlo applications I&#8217;ve seen.

PuzzlePixies.com is a children&#8217;s educational site. It&#8217;s not actually a single OpenLaszlo app, but lots of little games for different age groups.
I&#8217;ve seen some of these games before (e.g. the classic card matching memory game). But there&#8217;s something [...]]]></description>
			<content:encoded><![CDATA[<p>I just discovered <a href="http://www.puzzlepixies.com/">PuzzlePixies.com</a>, which is arguably one of the most valuable and important OpenLaszlo applications I&#8217;ve seen.</p>
<p style="text-align: center;"><a href="http://www.puzzlepixies.com/"><img class="size-medium wp-image-240  aligncenter" title="puzzlepixies_logo" src="http://www.antunkarlovac.com/blog/wp-content/uploads/2010/01/puzzlepixies_logo.png" alt="PuzzlePixies.com logo" width="300" height="91" /></a></p>
<p><a href="http://www.puzzlepixies.com/">PuzzlePixies.com</a> is a children&#8217;s educational site. It&#8217;s not actually a single OpenLaszlo app, but lots of little games for different age groups.</p>
<p>I&#8217;ve seen some of these games before (e.g. the classic card matching memory game). But there&#8217;s something about the colors and simple graphics that seemed to appeal to my 3-year-old son immediately. Maybe it&#8217;s the fact that a child&#8217;s voice introduces each game and tells you if you got the right answer?</p>
<p>The whole site is free. If you have kids, check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2010/01/19/the-most-important-openlaszlo-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MobileDataNow is Open Source</title>
		<link>http://www.antunkarlovac.com/blog/2010/01/15/mobiledatanow-is-open-source/</link>
		<comments>http://www.antunkarlovac.com/blog/2010/01/15/mobiledatanow-is-open-source/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 22:21:11 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<category><![CDATA[RIAs]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=237</guid>
		<description><![CDATA[MobileDataNow, a product that I&#8217;ve blogged about before, is now an open-source project. MobileDataNow started as a proprietary offering from FireTrust, and some time ago (late 2008/early 2009) was made available to the public. The source is available on Google Code.
MobileDataNow uses an OpenLaszlo front-end to allow you to configure data stores and mobile notifications. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mobiledatanow.com">MobileDataNow</a>, a product that I&#8217;ve <a href="/blog/2008/08/05/mobiledatanow/">blogged about before</a>, is now an open-source project. MobileDataNow started as a proprietary offering from <a href="http://www.firetrust.com/">FireTrust</a>, and some time ago (late 2008/early 2009) was made available to the public. The source is available on <a href="http://mobiledatanow.googlecode.com/">Google Code</a>.</p>
<p>MobileDataNow uses an OpenLaszlo front-end to allow you to configure data stores and mobile notifications. From the docs, it looks like it was upgraded to some edition of OL4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2010/01/15/mobiledatanow-is-open-source/feed/</wfw:commentRss>
		</item>
		<item>
		<title>November OpenLaszlo  Newsletter</title>
		<link>http://www.antunkarlovac.com/blog/2009/12/03/november-openlaszlo-newsletter/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/12/03/november-openlaszlo-newsletter/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:52:23 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=230</guid>
		<description><![CDATA[The November issue of the OpenLaszlo &#60;view&#62; newsletter is out. It&#8217;s available as a PDF. This issue covers some new CSS functionality, beyond what was mentioned in my post on CSS in OpenLaszlo.
In case you missed it, the October edition is still available, which covers built-in dropshadow functionality in OpenLaszlo. Check out Raju&#8217;s blog for [...]]]></description>
			<content:encoded><![CDATA[<p>The November issue of the <em>OpenLaszlo &lt;view&gt;</em> newsletter is out. It&#8217;s <a href="http://www.openlaszlo.org/misc/OpenLaszloView113009.pdf">available as a PDF</a>. This issue covers some new CSS functionality, beyond what was mentioned in my <a href="/blog/2008/11/03/css-in-openlaszlo/">post on CSS in OpenLaszlo</a>.</p>
<p>In case you missed it, the <a href="http://www.openlaszlo.org/misc/OpenLaszloView103109.pdf">October edition</a> is still available, which covers built-in dropshadow functionality in OpenLaszlo. Check out Raju&#8217;s blog for a <a href="http://openfuture.rajubitter.com/2009/08/25/openlaszlo-dhtml-css-3-demo-to-flash-or-not-to-flash-is-no-question/">demo of this feature</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/12/03/november-openlaszlo-newsletter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Raw POST Data from OpenLaszlo Datasets</title>
		<link>http://www.antunkarlovac.com/blog/2009/04/07/raw-post-data-from-openlaszlo-datasets/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/04/07/raw-post-data-from-openlaszlo-datasets/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:45:32 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[LZX Tips]]></category>

		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=219</guid>
		<description><![CDATA[There are three practical ways to get data from a browser client to a web service:

Query string parameters in a GET or a POST request.
POST parameters.
Raw POST data.

The first two are fairly straightforward: A query string is the part of the URL that comes after the question mark. Post parameters (as name/value pairs) can be [...]]]></description>
			<content:encoded><![CDATA[<p>There are three practical ways to get data from a browser client to a web service:</p>
<ul>
<li>Query string parameters in a GET or a POST request.</li>
<li>POST parameters.</li>
<li>Raw POST data.</li>
</ul>
<p>The first two are fairly straightforward: A query string is the part of the URL that comes after the question mark. Post parameters (as name/value pairs) can be added to a POST request by calling setQueryParam() on the dataset. If the client needs to send a large block of data to the server (e.g. an XML document) that data can be assigned to a single POST parameter.</p>
<p>The third one is a little more complicated. Essentially, it means all the POST body. i.e. Where the POST parameters would normally live. Older versions of the Flash Player had problems with this, so it was not possible to submit raw POST data with older versions of OpenLaszlo in SOLO mode.</p>
<p>This isn&#8217;t an issue today. The Flash Player can submit raw post data. So if you absolutely can&#8217;t have even a single POST parameter, you can specify content to be included in the POST body by calling:</p>
<pre>dataset.setAttribute("querytype", "POST");
dataset.setQueryParam("lzpostbody", "CONTENT");</pre>
<p>Note that the lzpostbody query parameter is a special name that tells OpenLaszlo to use the provided string as the entire POST body. Here&#8217;s an example of this in action:</p>
<pre name="code" class="xml">

&lt;canvas debug=&quot;true&quot; proxied=&quot;false&quot;&gt;
    &lt;dataset name=&quot;ds&quot; src=&quot;myService.jsp&quot; type=&quot;http&quot; request=&quot;false&quot;
             querytype=&quot;POST&quot;/&gt;

    &lt;button&gt;Do Request
        &lt;handler name=&quot;onclick&quot;&gt;&lt;![CDATA[
            var body = &#039;&lt;rawpostbodycontents&gt;Hello, this is some XML.&lt;/rawpostbodycontents&gt;&#039;;
            ds.setQueryParam(&quot;lzpostbody&quot;, body);
            ds.doRequest();
        ]]&gt;
        &lt;/handler&gt;
    &lt;/button&gt;

    &lt;handler name=&quot;ondata&quot; reference=&quot;ds&quot;&gt;
        Debug.write(&quot;RESPONSE:&quot;, ds.serialize());
    &lt;/handler&gt;
&lt;/canvas&gt;
</pre>
<p>You can download the <a href="/blog/wp-content/uploads/2009/04/rawpost.zip">entire source</a>, complete with a JSP that reads and echoes the raw POST data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/04/07/raw-post-data-from-openlaszlo-datasets/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What&#8217;s DHTML Compilation Good For?</title>
		<link>http://www.antunkarlovac.com/blog/2009/03/18/whats-dhtml-compilation-good-for/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/03/18/whats-dhtml-compilation-good-for/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 01:39:15 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<category><![CDATA[RIAs]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=213</guid>
		<description><![CDATA[OpenLaszlo allows you to compile applications to SWF8, SWF9 or DHTML. Recently I&#8217;ve heard people ask, &#8220;why would you want to compile an application to DHTML?&#8221;
When you think about it, that&#8217;s not a silly question at all. Regardless of whether you compile an OpenLaszlo application to SWF or DHTML, you&#8217;ll have similar benefits and simliar [...]]]></description>
			<content:encoded><![CDATA[<p>OpenLaszlo allows you to compile applications to SWF8, SWF9 or DHTML. Recently I&#8217;ve heard people ask, &#8220;why would you want to compile an application to DHTML?&#8221;</p>
<p>When you think about it, that&#8217;s not a silly question at all. Regardless of whether you compile an OpenLaszlo application to SWF or DHTML, you&#8217;ll have similar benefits and simliar constraints. On the positive side, coding complex and interactive user interfaces is straightforward. You&#8217;re using a language that was specificially designed for rich Internet applications (RIAs).</p>
<p>However, many of the problems people associate with SWF - inability to bookmark (what exactly?), lack of search engine exposure, back button integration (you want to try explaining what&#8217;s supposed to happen when you click back in a RIA), difficulty of integration with traditional HTML applications - affect DHTML-compiled OpenLaszlo applications too. Thankfully these days, most developers understand that a platform like OpenLaszlo isn&#8217;t supposed to replace HTML applications, but instead is intended for a specific type of application that&#8217;s difficult, if not impossible, to do with HTML. Think <a href="http://www.gliffy.com/" target="_blank">Gliffy</a>.</p>
<p>So if DHTML doesn&#8217;t solve some of most long-standing &#8220;problems&#8221; of Flash, what does it offer? Certainly not media support; in fact SWF-compiled OpenLaszlo applications have more consistent support for PNG, as well as FLV, SWF, MP3.</p>
<p>Surely DHTML-compiled OpenLaszlo applications must offer some other benefits then? Well, they work in Webkit, which means they&#8217;ll <a href="http://weblog.openlaszlo.org/archives/2007/07/our-first-iphone-app/" target="_self">run on the iPhone</a> (and of course many upcoming mobile devices that use DHTML). That&#8217;s definitely an advantage, but the applications are still limited by the performance of the small CPU.</p>
<p>So now we get to where DHTML compilation really shines&#8230; Remember how I said that OpenLaszlo was good for some applications, and HTML was good for others? DHTML-compilation in OpenLaszlo allows you to run one or more HTML applications <em>inside</em> your OpenLaszlo application!</p>
<p>How can it do this? By using the &lt;html&gt; tag, you can embed another web property (e.g. a web site, HTML-based application) inside your OpenLaszlo application. Here&#8217;s an <a href="/blogsupport/dhtmlcompilation/" target="_blank">example</a> that shows two HTML web sites embedded in the same OpenLaszlo application:</p>
<div id="attachment_215" class="wp-caption aligncenter" style="width: 510px"><a href="/blogsupport/dhtmlcompilation/" target="_blank"><img class="size-full wp-image-215" title="Screenshot of two HTML applications in one OpenLaszlo application" src="http://www.antunkarlovac.com/blog/wp-content/uploads/2009/03/screenshot.png" alt="Screenshot of two HTML applications in one OpenLaszlo application" width="500" height="305" /></a><p class="wp-caption-text">Screenshot of two HTML applications in one OpenLaszlo application</p></div>
<p>Unfortunately, I can&#8217;t simply embed this example into my blog, because it relies on the OpenLaszlo wrapper code. You have to click the screenshot above and then play with the windows.</p>
<p>You may be aware that SWF-compilation also supports the &lt;html&gt; tag. However, the problem with using the &lt;html&gt; tag with a SWF-compiled OpenLaszlo application is that the IFRAME which displays the HTML web site will always float above the SWF. That means you can&#8217;t really have a windowed application, unless you&#8217;re satisfied with only having one window in your entire application. And you can&#8217;t have two &lt;html&gt; tags, if they&#8217;re likely to ever overlap, since there&#8217;s no way to control which is on top at any one point.</p>
<p>As you can see, that&#8217;s not a problem for DHTML.</p>
<p>Download the <a href="/blog/wp-content/uploads/2009/04/iframesanddivs.zip">source</a> for this example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/03/18/whats-dhtml-compilation-good-for/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why I should RTFM</title>
		<link>http://www.antunkarlovac.com/blog/2009/03/16/why-i-should-rtfm/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/03/16/why-i-should-rtfm/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 01:23:36 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[LZX Tips]]></category>

		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=210</guid>
		<description><![CDATA[A few days ago, I wrote about how to access the named colors in OpenLaszlo 4.2.0. (Where Have All the Colors Gone?) I even wrote a little example showcasing the colors in the lz.colors array. Then Tucker helpfully directed me to a very complete example in the documentation that showed not only the location of [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I wrote about how to access the named colors in OpenLaszlo 4.2.0. (<a href="/blog/2009/03/12/colors-in-42/">Where Have All the Colors Gone?</a>) I even wrote a little example showcasing the colors in the lz.colors array. Then <a href="http://pt.withy.org/ptalk/" target="_self">Tucker</a> helpfully directed me to a <a href="http://labs.openlaszlo.org/trunk-nightly/docs/developers/color.html#csscolors">very complete example in the documentation</a> that showed not only the location of the colors, but also a better way of setting colors.</p>
<p>The W3C provides a <a href="http://www.w3.org/TR/css3-color/#svg-color">list of standard CSS colors</a>, and OpenLaszlo now allows you to use those color names <em>as strings</em> when setting colors.</p>
<p>So in addition to being able to say:</p>
<pre>myView.setAttribute("bgcolor", lz.colors.cornflowerblue);</pre>
<p>&#8230; and of course:</p>
<pre>myView.setAttribute("bgcolor", 0x6495ed);</pre>
<p>&#8230; what&#8217;s new is that you can also say:</p>
<pre>myView.setAttribute("bgcolor", "cornflowerblue");</pre>
<p>Notice that the color name is a string, not a variable. Finally, you can also use the pound (#) notation when setting colors in script:</p>
<pre>myView.setAttribute("bgcolor", "#6495ed");</pre>
<p>Note that when using pound notation, the color value must be a string.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/03/16/why-i-should-rtfm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where Have All the Colors Gone?</title>
		<link>http://www.antunkarlovac.com/blog/2009/03/12/colors-in-42/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/03/12/colors-in-42/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 00:47:46 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[LZX Tips]]></category>

		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=202</guid>
		<description><![CDATA[In OpenLaszlo you&#8217;ve always been able to specify colors in a variety of ways. In tags, you could use named colors, JavaScript hexadecimal notation and pound (hex) notation:
&#60;view bgcolor="red" width="20" height="20" /&#62;
&#60;view bgcolor="0xff0000" width="20" height="20" /&#62;
&#60;view bgcolor="#ff0000" width="20" height="20" /&#62;
In JavaScript, you could use either the hex notation or the named color:
myview.setAttribute("bgcolor", 0xff0000);
myview.setAttribute("bgcolor", red);
Note that [...]]]></description>
			<content:encoded><![CDATA[<p>In OpenLaszlo you&#8217;ve always been able to specify colors in a variety of ways. In tags, you could use named colors, JavaScript hexadecimal notation and pound (hex) notation:</p>
<pre>&lt;view bgcolor="red" width="20" height="20" /&gt;
&lt;view bgcolor="0xff0000" width="20" height="20" /&gt;
&lt;view bgcolor="#ff0000" width="20" height="20" /&gt;</pre>
<p>In JavaScript, you could use either the hex notation or the named color:</p>
<pre>myview.setAttribute("bgcolor", 0xff0000);
myview.setAttribute("bgcolor", red);</pre>
<p>Note that in JavaScript, the color is a global variable; not a string. That&#8217;s important, because if you try to use the variable&#8217;s name in OpenLaszlo 4.2, you&#8217;ll get a Debugger warning:</p>
<p>ERROR @colors.lzx#35: reference to undefined variable &#8216;red&#8217;</p>
<p>That&#8217;s because all the colors are now neatly arranged in an array called lz.colors. So in 4.2 you would write:</p>
<pre><span style="color: #ff0000;">myview.setAttribute("bgcolor", lz.colors.red);</span></pre>
<p>Another benefit of the colors all being grouped in an array - as opposed to being global - is that you can loop through them. I wrote the following application to display the colors and color names available in OpenLaszlo 4.2.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_colors_78952876"
			class="flashmovie"
			width="460"
			height="460">
	<param name="movie" value="/blog/wp-content/uploads/2009/03/colors.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/blog/wp-content/uploads/2009/03/colors.swf"
			name="fm_colors_78952876"
			width="460"
			height="460">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Click the button to render the color boxes. Move your mouse over the boxes to display the name of the color.</p>
<p>The code is below:</p>
<pre name="code" class="xml">

&lt;canvas width=&quot;460&quot; height=&quot;460&quot; proxied=&quot;false&quot;&gt;

    &lt;class name=&quot;colorbox&quot; width=&quot;30&quot; height=&quot;30&quot; clickable=&quot;true&quot;&gt;
        &lt;attribute name=&quot;colorname&quot; type=&quot;string&quot; /&gt;
    &lt;/class&gt;

    &lt;class name=&quot;colornameoutput&quot; extends=&quot;text&quot;
           font=&quot;Helvetica, Arial, sans-serif&quot;
           fontsize=&quot;24&quot; fontstyle=&quot;bold&quot;&gt;
        &lt;attribute name=&quot;updateDel&quot;
                   value=&quot;$once{new lz.Delegate(this, &#039;displayColor&#039;)}&quot; /&gt;
        &lt;method name=&quot;displayColor&quot; args=&quot;c&quot;&gt;
            this.setAttribute(&quot;text&quot;, &quot;lz.colors.&quot; + c.colorname);
        &lt;/method&gt;
    &lt;/class&gt;

    &lt;simplelayout axis=&quot;y&quot; spacing=&quot;10&quot; /&gt;

    &lt;view name=&quot;colorboxes&quot; width=&quot;100%&quot;&gt;
        &lt;wrappinglayout spacing=&quot;0&quot; /&gt;
    &lt;/view&gt;

    &lt;colornameoutput name=&quot;outputText&quot;&gt;
    &lt;/colornameoutput&gt;

    &lt;button options=&quot;ignorelayout&quot; width=&quot;80%&quot;
            height=&quot;80%&quot; align=&quot;center&quot; valign=&quot;middle&quot;
            font=&quot;Helvetica, Arial, sans-serif&quot;
            fontsize=&quot;13&quot; fontstyle=&quot;bold&quot;&gt;
            Show Me The Colors!
            (Be patient, it takes a moment).
        &lt;handler name=&quot;onclick&quot;&gt;
            this.setAttribute(&quot;visible&quot;, false);
            for (var i in lz.colors) {
                var colorValue = lz.colors[i];
                var attrs = {bgcolor: colorValue, colorname: i};
                var v = new lz.colorbox(colorboxes, attrs);
                outputText.updateDel.register(v, &quot;onmouseover&quot;);
            }
        &lt;/handler&gt;
    &lt;/button&gt;

&lt;/canvas&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/03/12/colors-in-42/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Webtuner Application Added to Webtop</title>
		<link>http://www.antunkarlovac.com/blog/2009/02/27/webtuner-application-added-to-webtop/</link>
		<comments>http://www.antunkarlovac.com/blog/2009/02/27/webtuner-application-added-to-webtop/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 00:05:05 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<category><![CDATA[RIAs]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=196</guid>
		<description><![CDATA[Vortex is an OpenLaszlo application built by Real Time Matrix. It&#8217;s essentially a customizable media browser - Real Time Matrix built a highly-configurable skeleton of the application, and brands it for various content providers. End-users can then embed the application into their own web pages, or into personal start pages (e.g. igoogle). The end-user gets [...]]]></description>
			<content:encoded><![CDATA[<p>Vortex is an OpenLaszlo application built by Real Time Matrix. It&#8217;s essentially a customizable media browser - Real Time Matrix built a highly-configurable skeleton of the application, and brands it for various content providers. End-users can then embed the application into their own web pages, or into personal start pages (e.g. igoogle). The end-user gets fed various forms of content - streaming audio, video, images, news feeds, etc. - depending on the configuration of that particular Vortex. In exchange, they see discreet ads at the bottom of the Vortex application. You can see a variety of skinned Vortices at <a href="http://www.vortexme.com" target="_self">www.vortexme.com</a>.</p>
<p>What&#8217;s new is that the Vortex has now been integrated into <a href="http://www.laszlosystems.com/products/webtop/overview">Laszlo Webtop</a>. You can check it out at <a href="http://www.gowebtop.com/" target="_blank">www.gowebtop.com</a>. You do need an account for gowebtop.com, but it&#8217;s fairly quick and free.</p>
<div id="attachment_198" class="wp-caption aligncenter" style="width: 470px"><a href="http://www.gowebtop.com/"><img class="size-full wp-image-198" title="Vortex Application in Laszlo Webtop" src="http://www.antunkarlovac.com/blog/wp-content/uploads/2009/02/webtop_vortex.jpg" alt="Vortex Application in Laszlo Webtop" width="460" height="338" /></a><p class="wp-caption-text">Vortex Application in Laszlo Webtop</p></div>
<p>What&#8217;s interesting to OpenLaszlo developers is:</p>
<ul>
<li>The Vortex application is completely dynamically-skinned. The components in the Vortex can be enabled, disabled and re-ordered without recompiling the SWF. All resources in the application get loaded over HTTP when the application initializes. This performs surprisingly well.</li>
<li>You can plug an OpenLaszlo application into Webtop relatively easily. Webtop provides the notion of applications, as well as windowing/docking/undocking behavior. And, Webtop includes some applicaitons that people use the most (Mail, Contacts, Calendar).</li>
</ul>
<p>Although Webtop does offer a service that proxies and optimizes data transactions between the client and data stores, you don&#8217;t <em>have</em> to use it; you can just compile an OpenLaszlo application that uses datasets in the normal way into Webtop, and run it alongside the existing applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2009/02/27/webtuner-application-added-to-webtop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenLaszlo 4.2 adds SWF9 Support</title>
		<link>http://www.antunkarlovac.com/blog/2008/12/29/openlaszlo-42-adds-swf9-support/</link>
		<comments>http://www.antunkarlovac.com/blog/2008/12/29/openlaszlo-42-adds-swf9-support/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 01:10:01 +0000</pubDate>
		<dc:creator>antun</dc:creator>
		
		<category><![CDATA[OpenLaszlo]]></category>

		<guid isPermaLink="false">http://www.antunkarlovac.com/blog/?p=191</guid>
		<description><![CDATA[In case you missed it among the holiday cheer, OpenLaszlo 4.2 was officially released last week. Personally, I&#8217;ve been looking forward to this release for a while, since it adds support for SWF9. SWF9 is bytecode that&#8217;s optimized for the Flash Player 9 runtime. Flash developers may know it as ActionScript 3 (AS3). The exciting [...]]]></description>
			<content:encoded><![CDATA[<p>In case you missed it among the holiday cheer, OpenLaszlo 4.2 was <a href="http://weblog.openlaszlo.org/archives/2008/12/openlaszlo-42-is-now-available/" target="_blank">officially released</a> last week. Personally, I&#8217;ve been looking forward to this release for a while, since it adds support for SWF9. SWF9 is bytecode that&#8217;s optimized for the Flash Player 9 runtime. Flash developers may know it as ActionScript 3 (AS3). The exciting thing for OpenLaszlo developers is that SWF9 is <em>vastly faster</em> than SWF8. And since Flash Player 9 is widely-deployed, you can start using it as the default runtime for new applications.</p>
<p>SWF9 support may not sound like a huge deal to many people - it&#8217;s just a matter of keeping up-to date with the newer version of Flash, isn&#8217;t it? Well, not exactly. The difference between SWF8 bytecode and SWF9 bytecode was significant. So big, in fact, that Adobe included two completely separate runtimes in Flash Player 9: one for running the new SWF9 bytecode, and a separate one for running SWF8-and-below bytecode. In other words, the SWF9 capability is a pretty big deal.</p>
<p>Just how much of a performance gain does the new runtime offer? A few months ago, while writing a post about optimizing data for Lzx (<a href="/blog/2008/07/18/openlaszlo-performance-tip-attributes-not-nodes/">OpenLaszlo Performance Tip: Attributes, not Nodes</a>), I found that the then-beta SWF9 runtime in OpenLaszlo was as much as 3.7 times faster than the SWF8 one, at loading and parsing XML data. At the time, much of the functionality was still missing from the 4.2 branch, so data loading was the only behavior I could test.</p>
<p>With 4.2 available, I wrote a simple test that measured how long it took to instantiate 100 windows:</p>
<pre name="code" class="xml">

&lt;canvas&gt;

    &lt;text id=&quot;output&quot; fontsize=&quot;36&quot; /&gt;

    &lt;class name=&quot;mywindow&quot; extends=&quot;window&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
    &lt;/class&gt;

    &lt;handler name=&quot;oninit&quot;&gt;&lt;![CDATA[
        var dStart = new Date();
        var j:Number = 0;
        var xpos:Number;
        var ypos:Number;

        for (j=0; j&lt;100; j++) {
            xpos = Math.max(150, Math.random() * canvas.width);
            ypos = Math.max(50, Math.random() * canvas.height);
            new lz.mywindow(canvas, {x: xpos, y: ypos});
        }
        var dEnd = new Date();
        var timeTaken = dEnd.getTime() - dStart.getTime();
        output.setAttribute(&quot;text&quot;, timeTaken);
        ]]&gt;
    &lt;/handler&gt;

&lt;/canvas&gt;
</pre>
<p>The results for creating 100 windows in OpenLaszlo 4.2.0 are:</p>
<ul>
<li>SWF8: 6,042ms</li>
<li>SWF9: 1,073ms</li>
</ul>
<p>That&#8217;s 5.6 times faster - even more dramatic than the results from the data loading test!</p>
<p>Surely all OpenLaszlo developers will now rush to recompile their applications to SWF9; all it takes is appending ?lzt=swf9 to the request, doesn&#8217;t it? Unfortunately, it&#8217;s not that simple. Moving from OpenLaszlo 4.0 to 4.1 involved a lot of language changes, specifically in anticipation of SWF9. I <a href="/blog/2008/07/02/migrating-lzx-code-to-openlaszlo-41/">wrote about this</a> a while back. Then, moving from OpenLaszlo 4.1 to 4.2, there were a few more changes, mainly because icompatibilities were found after 4.1 had been released, and in-depth development had started on supporting the new runtime. As an example, the &lt;script&gt; tag shouldn&#8217;t be used in SWF9. It actually partly works, but causes confusing errors. Better replace it with &lt;handler name=&#8221;oninit&#8221;&gt;.</p>
<p>Happily there are some resources and tools for developers needing to migrate their applications. There&#8217;s an OpenLaszlo wiki page on <a href="http://wiki.openlaszlo.org/Runtime_Differences#Upgrading_to_OpenLaszlo_4.2" target="_blank">Runtime Differences</a>, which should be your first stop. It describes how to use the Perl migration script that (in theory) updates your code for you. Remember that it may not catch everything. It&#8217;s hard to anticipate every manner in which developers will use a platform, so please be patient and provide any feedback on issues you hit on the <a href="http://forum.openlaszlo.org/">forums</a> or <a href="http://www.openlaszlo.org/lists" target="_blank">mailing lists</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antunkarlovac.com/blog/2008/12/29/openlaszlo-42-adds-swf9-support/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
