Tuesday, July 21, 2009

SQLite and AIR

So, I am spending some time, playing with AIR and the built in SQLite database. I am working on a small project that is for my benefit, but hey, I may share it later on :)

Anyways, last night I was going through the examples on Tour de Flex, and I am the kinda guy that learns by example, so I just copied the code that was there, modified it for my liking, and then tried to run it. I continually got the 1009 error, you know the not really telling you what is wrong error.

Anyways, after a quick Twitter talk with Andy Matthews, Jason Dean and Simon Free I changed the extension of the SQLite database to something other than the .DB that was in the sample code.

Now, with further discussion, it seemed like this was something of a rarity, and no one seemed to know why it wasn't working. (i.e. a .DB extension worked for Jason, but not me, Andy had issues with the .DB extension at a point) It just really seemed odd.

So, I went a little deeper. It seems that if you already have a .DB extension registered on your computer, you cannot make the SQLite database use that extension! This causes some concern I would imagine for installing programs on certain computers. Who knows what kind of extensions ppl have registered. Of course, as Jason tested, you can make ANY extension for your SQLite database.

So, if you are having issues with creating your first ever SQLite database, this may be the problem, however un-illuminating the 1009 error is. All of my AIR programs are going to use the agfusion extension for their database... so you should come up with your own.

**After some further testing, it seems that it is not just due to the fact that the file is already registered, but more due to the fact that there are no actions associated with the file type.

If you go to Windows Explorer > Tools > Folder Options > File Types, you can see what actions are associated with each file extension, by selecting the file type and then hitting on Advanced. Now for me the .DB extension had no actions associated with it, due to, well who knows. Anyways, I guess the point is, is that it really should work, but I am still keeping my unique file extension, to make sure that it doesn't.

In the Ag industry there are programs that already use the DB extension (as witnessed) and if I am making an AIR app to do something, it needs to work regardless of what might have already happened to a system, so I will play it on the safe side!

Tuesday, July 7, 2009

AutLabs

As a follow up to last weeks post about onTap and frameworks, I am going to talk a bit more about Ike and his current project.

Ike was recently diagnosed with Aspergers Syndrome, which is on the Autistic Spectrum. Those diagnosed with Aspergers typically have a hard time with social interaction and that results in a hard time with employment. Without being able to really read facial expressions and the differences in body language, it handicaps you in the workplace. This is clearly seen by the fact that only one in five people diagnosed with Aspergers or Autism are employed... out of 40 million people who are affected by this, that leaves a lot to be desired.

Ike has decided to DO something about this, by starting a project called Autelligent Laboratories, which will focus on employing those on the spectrum. Now of course, they need help!

Please visit the website and then the wiki and find out how you can help. Ike is a great guy and should be commended for his efforts, and we should all support him in any way that we can!

He is trying to trade up for a book deal to help raise money for the project... is there something you can trade? Or do you have a funny story to contribute to the book?

Thanks for reading :)