Hello everybody. I’m currently working on an Adobe AIR app that will manage inventory for a small company. It uses an SQLite database to store all the data… and my problem is not with getting the queries to work. I’ve been studying the code from the SQLite Admin program written by Christophe Coenraets. I wish I could have found an email address on his website, I would have asked him about this, since he wrote the code in the first place! Here’s a link to his app.
http://coenraets.org/blog/2008/02/sqlite-admin-for-air-10/
Anyway, here’s the code I can’t figure out.
var data:Array = result.data is Array ? result.data : [{rows: result.rowsAffected}];
The var result is a SQLResult object, and the query it runs (select * from table) returns rows as it should. I tried looping over result.data to make an ArrayCollection to populate a DataGrid with… but my code won’t work.
Could somebody explain WTF is going on with the IS keword, the question mark, and the curly brackets INSIDE square brackets?! I can’t find anything documenting this syntax online and it’s driving me nuts.