<?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>PlanetB &#187; flex</title>
	<atom:link href="http://www.planetb.ca/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.planetb.ca</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 23:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to Use Apache Ant to Automate BlackBerry PlayBook Builds</title>
		<link>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/</link>
		<comments>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 12:23:47 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.planetb.ca/?p=445</guid>
		<description><![CDATA[A couple of nuances that I&#8217;ve come across with using the PlayBook SDK from the command line include both the need to pass a boat-load of parameters and a lack of documentation on just how to use them. Through a bit of trial and error, I managed to get debugging with the command line tools [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.planetb.ca/wp-content/uploads/2010/12/BlackBerry-PlayBook-Apache-Ant2.jpg"><img src="http://www.planetb.ca/wp-content/uploads/2010/12/BlackBerry-PlayBook-Apache-Ant2.jpg" alt="" title="BlackBerry-PlayBook-Apache-Ant2" width="600" height="339" class="aligncenter size-full wp-image-452" /></a></p>
<p>A couple of nuances that I&#8217;ve come across with using the PlayBook SDK from the command line include both the need to pass a boat-load of parameters and a lack of documentation on just how to use them.  Through a bit of trial and error, I managed to get debugging with the command line tools to work and finally decided to automate some of the effort by using Apache Ant.</p>
<p>Apache Ant is a build tool similar to Make that facilitates the automation of the compilation and installation processes involved in building programs.  Ant is also really simple to use.</p>
<p>I&#8217;ve decided to share my Ant build.xml file template for PlayBook application building. It&#8217;s fairly straight forward.  Hopefully the following instructions (and video) will help you use the template.  Note that these instructions do assume that you can already build and package swf and bar files and have already been able to successfully deploy to the PlayBook simulator.<br />
<span id="more-445"></span></p>
<p>You can download <a href="http://www.planetb.ca/projects/PlayBook-Ant/Playbook-build-Ant-template-beta2-22610.zip">the build.xml template here</a>. <i>(updated Jan 12-2011 to work with Beta 2 simulator and to add better automated debug support)</i></p>
<p>Also, note that this build.xml template works only with Windows.  It will not work with Mac or Linux.</p>
<p>To Get Ant Setup:</p>
<ol>
<li> Download the Apache Ant .zip archive from here: <a href="http://ant.apache.org/bindownload.cgi" target="_blank">http://ant.apache.org/bindownload.cgi</a></li>
<li> Extract the zip archive to somewhere on your system</li>
<li> Add the Ant bin directory to your System Path.  (Control Panel -&gt; System -&gt; Advanced tab -&gt; Environment Variables -&gt; Find the Path variable and add the path to the Ant bin directory)</li>
</ol>
<p>To Use the Ant build.xml File:</p>
<ol>
<li>Rename the build-template.xml to build.xml and place it in your src directory.</li>
<li>You will have to modify the first 5 property tags and set the values as necessary.</li>
<li>If your package (bar file) requires files or directories other than the .swf file, you will need to add them at line 34.  Uncomment the last couple of arguments in the package target and modify them or delete them or add more as necessary.</li>
<li>To execute a build target from the command line, type &#8220;ant &#8220;.  So, for example, to build the packagerun target, you type &#8220;ant packagerun&#8221;.</li>
</ol>
<p style="padding-left: 60px;">The following targets are included in the file:</p>
<ul style="padding-left: 60px;">
<li> build-debug</li>
<li> build-release</li>
<li> package</li>
<li> deploy</li>
<li> run</li>
</ul>
<p style="padding-left: 60px;">There should also be a packagerun target that calls, in order, build-debug,package,deploy and then launches the app.</p>
<p style="padding-left: 30px;">4.  If you would like to create a debug session, open another command prompt and type &#8220;fdb&#8221;.  This will start the Flex debugger. Once open, type &#8220;run&#8221; before launching your PlayBook app from the command line.  Once the app is launched, the debugger will break.  Type &#8220;continue&#8221; and the debugger and app will continue.  Trace statements will be output to the debugger session &#8211; as will errors.  Further documentation on using fdb (setting breakpoints and stuff) can be found on the adobe docs website.</p>
<p>Here&#8217;s a video of me using Ant for an app I&#8217;m working on.  Click on it to watch at Vimeo.com and see it in HD.  Otherwise it&#8217;s difficult to see the text.  Cheers!</p>
<p><center><iframe src="http://player.vimeo.com/video/17746988?title=0&amp;byline=0&amp;portrait=0" width="588" height="331" frameborder="0"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Install the HelloWorld app into the BlackBerry PlayBook Simulator</title>
		<link>http://www.planetb.ca/2010/10/how-to-install-the-helloworld-app-into-the-blackberry-playbook-simulator/</link>
		<comments>http://www.planetb.ca/2010/10/how-to-install-the-helloworld-app-into-the-blackberry-playbook-simulator/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 02:59:52 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Hello World]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.planetb.ca/?p=387</guid>
		<description><![CDATA[Just a couple of weeks ago, it seemed like the BlackBerry PlayBook was borderline vaporware &#8211; with all its glass enclosure protection at press conferences and such. But yesterday RIM unleashed the BlackBerry PlayBook SDK and OS simulator to the public, showing that the PlayBook indeed is not just an mp4 on repeat. As soon [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.planetb.ca/wp-content/uploads/2010/10/helloworld.jpg" alt="" title="helloworld" width="588" height="190" class="aligncenter size-full wp-image-390" /></p>
<p>Just a couple of weeks ago, it seemed like the BlackBerry PlayBook was borderline vaporware &#8211; with all its glass enclosure protection at press conferences and such.  But yesterday RIM unleashed the BlackBerry PlayBook SDK and OS simulator to the public, showing that the PlayBook indeed is not just an mp4 on repeat.</p>
<p>As soon as I got home from the office yesterday, I downloaded the files offered at the BlackBerry developer site and got straight to playing around.  </p>
<p>iPhone and Android developers might be a little miffed at first with the PlayBook simulator.  It&#8217;s not an atomic program like what you have the the iPhone or Android simulators, but comes in the form of an ISO OS install image.  Getting the ISO to install on Virtual Box, my first choice, proved difficult.  I checked the PlayBook dev forum threads and saw that I wasn&#8217;t the only one who ran into issues with Virtual Box.  With VMWare, on the other hand, it was simple a simple process of mounting the ISO on a Linux based (Ubuntu) VM with an IDE hard drive (note that it did not install to a SCSI drive &#8211; the default hard disk type).</p>
<p>After initially getting it installed, I found that I had to restart the VM a couple of times before it began responding properly.  Perhaps it was because I was also running Camtasia in the background, but eventually I was able to click on the various buttons without the OS freezing on me.</p>
<p>I then took a stab at installing the HelloWorld app (that comes with the PlayBook SDK) onto the simulator.  I first tried to use the Flash Builder 4 approach to install the app, but ran into some errors doing so.  In fact the Flash Builder 4 IDE integration with the SDK seems hit and miss.  I then turned to the command line (in Windows) and ran the BlackBerry AIR packager program, pointing to the ip address of the simulator VM as the target device.  I rarely get things right the first time, so I was somewhat stunned to find the HelloWorld app install and run without much difficulty.</p>
<p>I captured the whole thing to share the process.  This is my first tutorial video in a while, but I expect to make some more for the PlayBook and Adobe AIR.  Enjoy.<br />
<br/><br />
<center><iframe src="http://player.vimeo.com/video/16196440?title=0&amp;byline=0&amp;portrait=0" width="601" height="338" frameborder="0" style="border:1px solid black;"></iframe></center><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.planetb.ca/2010/10/how-to-install-the-helloworld-app-into-the-blackberry-playbook-simulator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Capturing Keyboard Events in Adobe Flex 3</title>
		<link>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/</link>
		<comments>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 03:10:54 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[KeyboardEvent]]></category>

		<guid isPermaLink="false">http://www.planetb.ca/?p=80</guid>
		<description><![CDATA[For anyone else spending an unfortunate length of time unsuccessfully attempting to capture keyboard events in a Flex 3 application (for browser or AIR), here&#8217;s where you&#8217;re probably going wrong. You are likely registering the keyboard listener too early. It&#8217;s likely that you are calling an init() method where you register the keyboard event on [...]]]></description>
			<content:encoded><![CDATA[<p>For anyone else spending an unfortunate length of time unsuccessfully attempting to capture keyboard events in a Flex 3 application (for browser or AIR), here&#8217;s where you&#8217;re probably going wrong.</p>
<p>You are likely registering the keyboard listener too early.  It&#8217;s likely that you are calling an init() method where you register the keyboard event on creationComplete.  Instead, call the init function later on.  Try registering the event in the applicationComplete event handler.</p>
<p>More info here:<br />
<a href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;productId=2&#038;postId=304">http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;productId=2&#038;postId=304</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

