States- and event handler-related bug in Flex SDK 4.0

01:07 PM

There is a bug in Flex SDK 4.0 which prevents MXML components with event handler with state modifier from being garbage collected, which creates memory leaks.
So, don’t use state event handlers in your production code, like this:
<s:Button label=”Test” click.main=”trace(‘click!’)” />
Use simple event handlers instead with if clause:
<s:Button label=”Test” click=”if(currentState == ‘main’) trace(‘click!’)” />
I’ve reported the [...]

Comments Off

Monkey patches and Runtime Shared Libraries (RSLs)

03:08 AM

Monkey patching is replacing parts of the flex framework with your own classes. For example, you can copy mx.core.UIComponent to src folder of your project, modify it, and flex will use your modified class instead of framework’s one.
Genereally it’s considered to be evil, and I actually agree with this point of view. But sometimes you [...]