Jul 01

Air IIS log reader

Posted by James Netherton | Tuesday 01 July 2008 7:00 AM | In AIR

After an hour or so hacking, I've put together a very simple Adobe Air application to read IIS log files that are in the W3C extended log file format.

Usage of the application is fairly obvious once it's up and running so I won't go into any detail on how it works. Here are some screen grabs that explain the basics. Click the thumbnails to see the full sized images.

Viewing a log file

Viewing a log file

Show / hide data columns

Show / hide data columns

View data row (double click datagrid row)

View data row

Here is the Zipped Air file and MXML source:

WebLogReader.zip
Air File

WebLogReader-Source.zip
Source Code


 

Mar 19

First steps with Apollo

Posted by James Netherton | Monday 19 March 2007 9:25 PM | In AIR

After a 20 minute hack with Apollo I've written an extremely simple application which takes some HTML input and renders it using an HTML component. There's the option to save the file to a plain text .HTML file as well.

Here's the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:ApolloApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

   <mx:Script>
      <![CDATA[
         import flash.filesystem.*;
         
         public function saveHTMLFile():void
         {            
            var file:File = File.desktopDirectory;
            file = file.resolve("myHTML.html");

            var stream:FileStream = new FileStream();
            stream.open(file, FileMode.WRITE);
            stream.writeUTFBytes(HTMLText.text);
            stream.close();
         }
         
      ]]>
   </mx:Script>

   <mx:VBox height="100%" width="100%">
      <mx:TextArea id="HTMLText"
          width="100%"
          height="100%"/>


      <mx:HTML htmlText="{HTMLText.text}"
             width="100%"
             height="100%"/>

      
      <mx:ControlBar>
         <mx:Button label="Save HTML Document"
                click="saveHTMLFile()"
                enabled="{HTMLText.text != ''}"/>

      </mx:ControlBar>
      
   </mx:VBox>


</mx:ApolloApplication>

I can't wait to have a proper experiment with everything. Download the Apollo runtime from the Adobe labs site and check out the sample applications.

My list of technologies to experiment with grows ever larger. So much to learn so little time!

Update: Freaky, I didn't realise Ray Camden posted a similar application before me. It appears there's some others out there that do pretty much the same thing, except for the save function. Looks like several people all had the same idea for their first Apollo application.