Its been 6 months since I am working on this project and just when I thought I am done with it, I realize that I have been using Pixels in my stylesheets all the while and this doesn’t support the browser based “text size” settings (Internet Explorer). So, when the user changes the ‘text size’ settings, the font size of the applications doesn’t change. For this to work, all pixels now have to be modified to ‘em’ unit.
Em is considered to be a more effective way of representing layouts as it is relative to the body text/font size. This ensures that the aspect ratio of the layout is maintained even when the dimensions of the text changes (browser settings).
For me however, looking at the size and the number of the CSS files I had, this was a daunting task. A quick Google search showed a good number of articles on how to convert pixels to em, but all of them were mere number converters. I still would have to convert each pixel into em manually. I never had the patience to do that and therefore I wrote a small utility script that takes a CSS dump and converts all pixel values to em. The online version of this is available at pixel2em.kleptomac.com. I hope others will find it useful.

pixel2em
If you are used to using the ApplicationUpdaterUI class for providing the auto update feature for your AIR application, and have recently started to work on the new Native Process API in Adobe Air 2 beta, you would realize that the auto update functionality just doesn’t work. This is because the ApplicationUpdaterUI is designed to work only for the default AIR applications (.air). If you want to provide auto update functionality for your executables (.exe), you need to rather use the ApplicationUpdater Class. You don’t have to modify the update.xml file. The only difference is since this is an executable, you can’t do an auto upgrade of the file. Rather, you will need to let the user download the file (if you are trying the update the .exe file). The most simplest way to do it is to capture the “UpdateStatus” event of the ApplicationUpdater and check if an update is available and then trigger a ‘navigateToURL”. Checking if there is a new version available can be done using the “StatusUpdateEvent.available” property. Here is the code that you can use.
private function checkForUpdate():void
{
appUpdater.updateURL=”<path>/update.xml”; // Server-side XML file describing update
appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); // Once initialized, run onUpdate
appUpdater.addEventListener(StatusUpdateEvent.UPDATE_STATUS, onUpdateStatus);
appUpdater.addEventListener(ErrorEvent.ERROR, onError); // If something goes wrong, run onError
appUpdater.initialize(); // Initialize the update framework
}
private function onError(e:UpdateEvent):void
{
Alert.show(e.toString());
}
private function onUpdate(e:UpdateEvent):void
{
appUpdater.checkNow();
}
private function onUpdateStatus(event:StatusUpdateEvent):void
{
if( event.available ) {
// set an information text for the user
application.updateInfo.label = “An updated version ” +
event.version + ” is available. Click here to download.”;
// or directly display a download prompt
var urlReq:URLRequest = new URLRequest(“<url to the executable>”);
navigateToURL(urlReq);
}
}
Found an interesting POC of jQuery Desktop using HTML5, CSS and jQuery at SonSpring.com. Though the implementation is basic, its certainly going to trigger more ideas and could be a good way of designing management tools. jQuery is a great library for javascript and when mixed with HTML 5 and CSS can create magic.
I was trying my hands on the new NativeProcess API in Adobe Air 2 SDK. This API allows communication with system processes using the standard IO. I tried an example with a small java application that reads and write data to the console and it looked pretty promising. I realized, the best application that’s readily available in Windows for testing the STDIN and STDOUT is the good old DOS and this is how I started putting together this prototype in place that allows you to use all the dos commands like you would in a DOS Console and also have the features to format it, color/highlight it, save the console contents as a text file and add shortcuts other command/batch files.
This is particularly useful if you want to send a copy of the console to some one for debugging, highlighting specific areas.
This application also has the feature to add shortcuts to other DOS/batch files. So, you don’t have to clutter your desktop with shortcuts to different servers. You can create a shortcut to say a Tomcat server, OC4j etc right in the application and launch them.

This certainly is a quick prototype of the NativeProcess API but looks like has got scope for improvement and real use.
Current version: 0.1
* Air based Dos application
Current version: 0.2
* Bug fixes
* Auto update for the executable