/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Iconara » 2007 » November

Archive for November, 2007

Architectural Atrocities, part 8: is there no equality?

The collections in Flex are good as data providers for list and tree components, doing the dirty work of making sure that the components know of changes made to the underlying data, but frankly they suck at most other things. Most importantly they suck at being collections. In this post I’m going to show you why and how to alleviate the problem somewhat.

Read the rest of this entry →

MXMLC WTF (7): Snooping with verbose stacktraces

The -verbose-stacktraces flag to mxmlc is really useful, but it also has a fun, but disturbing, side effect: you can discover how the person who packaged a swc organized their project. If an error is thrown in a context where the call stack includes methods defined by classes inside a swc the getStackTrace method on Error reveals the location of the .as file as it was when it was compiled.

Read the rest of this entry →

Finding the debug version of Flash Player for Leopard

If you have installed Leopard and want to be able to upload files but at the same time debug your Flash and Flex applications you can find the debug versions of the prerelease player (that has the file upload fix) in the Flex 3 SDK nightly builds, just download, unzip and look in the “runtime” directory.

This wasn’t obvious to me, and I spent a long time hunting it down. I hope this comes to use the next time someone googles for leopard debug flash player.

Edit Since 10.5.1 came out, this became a little less useful. Go with the release version for development instead of using the nightlies.

Edit This page http://www.adobe.com/support/flashplayer/downloads.html lists the latest version of the release debug player.

A generic way to remove an event listener

This might be obvious to everyone, but I thought I’d share a snipplet containing a generic way of removing an event listener:

event.currentTarget.removeEventListener(event.type, arguments.callee)

Place it in your handler function, I prefer to put mine on the first line.

It’s useful in situations where you want to stop listening after the first event has fired, for example. You can use it when the listener is an anonymous inner function, if you don’t know the type of the event, if the dispatcher is unknown or any combination of these.

Most of the time using weak references is probably more appropriate, but in some situations the snipplet above is handy.

Read the rest of this entry →