2009-12-30

Error 1069 with item renderers/editors

Just in case you happen to be working with a DataGrid and itemRenderers / itemEditors, as you test (in my case a CheckBox was used as an itemRenderers / itemEditors), you might see the error below get thrown:

ReferenceError: Error #1069: Property null not found on [some class] and there is no default value.
at mx.controls::AdvancedDataGridBaseEx/itemEditorItemEditEndHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls::AdvancedDataGridBaseEx/endEdit()
at mx.controls::AdvancedDataGridBaseEx/deactivateHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls::AdvancedDataGridBaseEx/endEdit()
at mx.controls::AdvancedDataGridBaseEx/mouseDownHandler()
at mx.controls::AdvancedDataGrid/mouseDownHandler()

The mistake I made was dumb, I basically forgot to specify the dataField and editorDataField properties on the DataGridColumn. So make sure you specify those values when working with itemRenderers / itemEditors!

2009-12-22

Participate in Flex Survey

Here is your chance to help improve Flex, go take the following survery.

2009-12-01

Anyone know how to display currency symbols?

Anyone know how to display currency symbols in Flex (for euro, pound, yen, etc...)? Without the use of icons?Any help is greatly appreciated.

2009-11-19

ChromeOS could be game changer

Just got home and was reading the news today about Google's ChromeOS. And after seeing a couple of videos of what this OS is going to be about, I think this can be a game changer. Think about it, every day we spend most of our time doing something on the web: email, chatting, social networking, buying, selling, research, studying, etc... Now granted, being a developer, my work is done all on the local machine, thus on the local OS, but that's true for a very small portion of the population. For the vast majority of people using a computer, all the actions mentioned previously are done on the internet via a web browser. The only thing they need the local computer for is to store pictures and music.

What Google is doing with the ChromeOS is making using a computer simpler and thus more accessible to people who still don't want to use a computer, or simply find one hard to use. Recently I've had a friend get a MacBook and an iPhone, one of the first things she mentioned is how easy it was to setup everything she uses on a daily basis for her professional and personal life. If people can eventually say that about a computer running ChromeOS, then Google has won. Ever hear anyone say that about Windows? hmmm. It has become easier yes (especially with Windows 7), but it is still not as simple.

Another good thing about ChromeOS is that it is basically a browser frontend. So that means more Flex and AIR applications will be able to reach the masses. So one unified platform to create applications that can run of various devices (netbook, mobile, PCs)...one step closer to utopia :)

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?