2009-10-05

Adobe Flash news from MAX

Although I am not there this year, I did have a chance to follow the Adobe MAX Day 1 Keynote today and there is some great news that was announced. In no particuliar order:
  • Flash Player 10.1 will run on all devices, yup that includes smartphones, no need for FlashLite anymore.
  • Flash Player 10.1 reduced application footprint by 50% in some cases (like DataGrids)...important for running on smartphones.
  • Flash Player 10.1 will run on BlackBerry, Palm Pre and...and...iPhone, cool! (sample Flash iPhone source code here)
  • Flash Catalyst beta 2 has been released (more info here)
  • AIR 2.0 is going to have some killer features: microphone integration, touchscreen, launch native applications and more
  • LiveCycle Enterprise new features related to some points above... details here and here.
Can't wait for tomorrow's keynote :)

Administering SQLite for AIR projects

During AIR development I have found that using SQLite Administrator is pretty good. Allows me to easily create/update table structures, run queries and edit data.

Error #3132 in AIR and SQLite Data Types

I was working on an AIR project which makes use of the embedded SQLite database this week and ran into the following error:

Error #3132: Data Type Mismatch.

At first I thought no big deal, I am doing something wrong at the coding level. The code in question was doing an insert on a table and so I thought I was passing the wrong data to the database, but at first glance, I could not see anything wrong. Then I started by removing parts of the columns I was inserting into in order to figure out which one was the problem and I still couldn't figure it out. After some googling and confusion I remembered I changed the data type (from Boolean to Text) on a column on that exact table. So what I did was to drop (delete) the table and re-create it from scratch and voila, problem solved.

So the error was correct, but didn't occur because the data I was passing was incorrect, but because SQLite still thought the data type of the column was a Boolean. Deleting and re-creating the table was the solution.

That brings me to point and wondering if I can get some feedback, I have seen that working Boolean and Timestamp data types in SQLite and AS3 is not working as fluently as it should be, so I use Text and Numeric for each respectively (at the DB level that is). Specifically for date information, I simply do a Date.getTime() in AS3 to get the number of milliseconds since 1970-01-01 and store that, seems to work for me. Anyone else have these problems?