Goal
Add an item to an ArrayCollection when changing states.
Challenge
The AddChild override only works to add visual children to other DisplayObjects, which leaves you with the option to use a SetProperty override to completely replace the source of the ArrayCollection — or you could listen for the enter event on the state and write some ActionScript [...]
Monthly Archives: April 2009
Custom State Overrides in Flex 3
Work-around for XMLDecoder Bug #SDK-17271
View Flex Bug #SDK-17271
After a whole bunch of digging around under the hood of the mx.rpc.XMLDecoder class, I finally pinpointed the line that is causing it to incorrectly decode elements that do not have sub-elements. Basically, when it gets to an element that it considers to have simple content (meaning just a string value between [...]
Hooray [Flex Builder] Snippets! (Follow-up)
UPDATE: I gave up on using the CFEclipse plugin a while ago mainly due to it’s inoperability in MXML files and have switched to using Sourcemate; The templates feature is pretty much everything i could ask for and it’s loaded with a ton of other great features. With Sourcemate and the Flexformatter, I’m pretty pleased [...]
Hooray [Flex Builder] Snippets!
I just came across Lee Brimelow’s tutorial for using the dynamic snippets feature of CFEclipse. His step-by-step walk though guides you through installing the CFEclipse plugin and setting it up to work with ActionScript files. He’s explaining how to do it in the context of a Flash project, but it works with any [...]
Center Adobe AIR Window
I always end up digging around in past projects for this snippet, so I’m putting it here for safe keeping, and maybe it’ll help you out too.
public static function centerWindow(win:WindowedApplication):void
{
var screenBounds:Rectangle = Screen.mainScreen.bounds;
win.nativeWindow.x = Math.floor((screenBounds.width – win.width)/2);
win.nativeWindow.y = Math.floor((screenBounds.height – win.height)/2);
}
The real trick here is that [...]
Using p4merge as a git mergetool
So, don’t get me wrong, I hate Perforce. It actually makes my head hurt a little remembering my experience with it. The only saving grace was the Perforce merge tool, p4merge. There are number of different diff/merge tools that will work with git on OS X, but I’m not all that impressed [...]
