September 11th, 2007 — Flex
So, I’m sure it’s necessary, as bindings can happen at strange times, but null exceptions fail silently and can cause lots of debugging headaches when dealing with Data Bindings.
For me, I had forgotten to set an initialize value, so I was attempting to reach object.value, but object was null. Normally this throws an error, a quick and easy fix, but when this happens during Data Binding, no error, so you’re left scratching your head wondering why the hell your function is finishing on the 2nd line of code.
4 hours later, you look up and see that you forgot to initialize the var.
August 28th, 2007 — one-liners
I’m a fan of one-liners, and here’s an AWESOME one-line that saves a LOT of code, use this in a for each() for maximum fun.
someArray().filter(function(o:*, index:int, arr:Array):Boolean{return o.selected})
This makes looping through arrays and checking values quick and painless. You can also add in a .every() function on the end if you’re doing something simple, like tracing or logging (just remember to return false; in the every function).
August 21st, 2007 — Flex, Misc
I just ran across an awesome tip/trick to remember when you need to cancel events in Flex. (or even writing your own).
From Sasha Magee @ Adobe on the ApolloCoders group:
The events that end in “ing” are the cancellable events that happen BEFORE the displayState change. We added these specifically so you could cancel the event.
I know, one of those things that seems obvious after you read it, but I hadn’t seen it said before. Something to keep in mind when your preventDefault() isn’t working.
August 18th, 2007 — Uncategorized
After several “what’s your blog” questions at the recent Flex|360 Conference, I’ve decided to try the blog thing again. Who knows what’ll actually make it’s way to the page, we’ll just have to see. I’ve already got my first post planned, hopefully I can take some screenshots yet tonight, then I can get some actual content up.
August 18th, 2007 — Uncategorized
Hat6 is the freelance persona of Dusty Jewett. Currently working for Panasonic Avionics, Dusty is always looking for ways to stretch his development skills, especially in the upcoming RIAvolution.
Dusty entertains all offers, especially the wonderful “can’t refuse” type. Big or small, just drop an email.