KonamiCode added to DestroyFramework

 

Sure, I could have spent tonight working on useful features for DestroyTwitter, but no, I wrote a KonamiCode class. To use it, simply instantiate it with a stage and you’re good to go.

On a related note, I realized I’ve been neglecting GitHub for months, but now I’m back! I also plan to return to the experimentation game after reminiscing about my convex hull, delaunay triangulation, and voronoi studies at work today. When you develop apps all day, writing experiments can be a breath of fresh air, allowing a level of creativity you simply can’t get with apps.

'Undocumented feature' in Rob Penner's AS3 Signals

 

bug_feature

Last week, I started replacing events in DestroyFramework with Rob Penner’s AS3 Signals. They’re faster, shorter, and include a few methods that developers have been dying for. Unfortunately, the first implementation, into my new Group class, didn’t work. I was puzzled to say the least. After literally hours of testing and debugging, I discovered the culprit.

It turns out, the remove(listener) method lacks a check for listener existence in the listeners array. When the method is called, if the index of the listener returns -1, the array splices the first listener. I forked the Git repository and implemented the fix on the Signal, NativeSignal, and DeluxeSignal classes. And because a fix isn’t a fix without proper unit testing (says Joel Hooks), I added the unit tests as well.