Working with AIR, files and XML configuration: tips & tricks

In last months I worked so hard with Flex, AIR and files. I’d like to share with you some tips that I think could save your time when you work on it.

 1. Don’t copy, write or do anything else with File.applicationDirectory. In Windows Vista, when you install an AIR application in Program folder, you can’t copy or update a file becuase Microsoft policy don’t allow to work on files in this directory and in all subdirectories.
If you try to make it, it fails silently so stop to execute the code immediately.

2.  You can’t set an <installFolder> different of Program or Application folder. If you try to set a different path like ../ or anything else in AIR configuration xml, when you create .air file, procedure fails with an error.
So you can only set Program folder (Windows) or Application folder (Mac) or a subdirectory like: Applications/myAirAppDir/

3. Attribute <programMenuFolder> is ONLY for Windows.
When you set this attribute you can choose path of Start/Programs menu. It’s optional attribute.

4. Remember to set <name> attribute without special chars.
If you try to make it, or you accidentally copy this attribute in the same XML configuration file, it fails with an error.

5. You can’t install AIR applications in a computer if you don’t have system privileges.

I hope that those suggestions could help in your daily development.

Merapi project: a bridge between AIR and Java

From Rich Tretola blog I read an interesting news about a new project called Merapi that it will be a bridge between AIR and Java.

I think it’s an interesting project and they are searching alpha tester for now, so take a look at the project site and submit yourself!

Merapi team is amazing: Adam Flater, Dave Meeker, Juan Sanchez, Andrew Powell, Rich Tretola, Rhazes Spell and Alex MacCaw.

To take a look at this great solution see Merapi video page.
Have a great work guys. 

easyAIR: how to develop easily with AIR

A couple of weeks ago I started some of new Flex and AIR projects.
When I start to work on it, I realize that when you work on AIR there are many times that you use same API.

For example save XML files, manage them (add, remove and finally change a child), create backup files and so on, they are normal operations to find in a desktop application.
So I decide to work on a little library for AIR that I’ll call easyAIR and I’ll release for FREE in next months (I suppose on October / November).
I’ve a lots of AIR and Flex projects to develop in next months so when I find a particular and interesting feature that I could use in many project I’ll create it and put in this AIR library.

If you have any idea, suggestion or request, please fell free to contact me and tell me what do you think about it.
Thank you in advance to everyone that email me.

Road to Scotch on the Rocks

Yes guys, 3 weeks and it starts! I booked my hotel room and my flight a month ago and now I’m making material for my session.

I’ll talk the last day (Friday at 10.30 AM) about “Manage Flash Lite Data with Flex and Air”, when I propose this session I think that it could be very interesting to view the power of Flash Platform, in fact I’ll show a real case history that I’m working on now and explain how to create a little CMS with Flex and AIR for Flash Lite contents.
Flash Platform is too amazing, you can develop from mobile to desktop and not different application but a unique application that collaborate together.
You can find great speakers there like Ben Forta, Peter Elst, Neil Webb, Charlie Arehart, Mark DrewAndrew Shorten so there are all elements to make a great event!  

I’m sure to meet a lots of new strong developers and designers and I’ll spend a fantastic time in Edinburgh.
For more information about the event or to take part, please see Scotch on the Rocks web site. 

See you there guys!

 

Flex 4 (Gumbo) and states

Surfing on web I read Ted’s blog that talk about new feature of Flex 4 (codename Gumbo) about states!
So I take a look at opensource.adobe.com page that talks about this new feature… very cool!

Adobe creates a very simple way to add, remove, show and hide components in a Flex application with a new attributes: includeIn and excludeFrom.

In few code rows you can include or remove Flex components:

<!-- Given the states A,B,C -->
<m:states>
    <m:State name="A"/>
    <m:State name="B"/>
    <m:State name="C"/>
</m:states>

<!-- This button will appear in only states A and B -->
<Button label="Click Me" includeIn="A, B"/>

<!-- This button will appear in states A and B --> 
<Button label="Button C" excludeFrom="C"/>

If you have a couple of minutes, please read about Flex 4 states, it’s so interesting!

 

Very cool way to do this! I think that Flex 4 will become the BEST solution to make RIA and desktop application (with AIR obviusly) in IT market!