I've been playing a bit with ActionScript and the like lately. ActionScript and few other languages never really caught my interest. Sure, I can read and I could manage, but why? ;-).
In fact, I've been avoiding Perl, ActionScript and few others professionally for years:
Q:"So you know Java, Quartz, JMX, Unix/Linux, etc. what about Perl?"
A:"Oh my, to be honest, I'm afraid of it...".
Sometimes, you just have to suck it up and do the damn thing anyway.
Flex has some interesting things despite being single threaded(not the flash engine itself) : function pointers, easy binding, easy drag and drop, etc. However, some simple to more complex things can become annoying, while with more code, but still simple code, the same thing would be trivial with a Desktop UI toolkit(that you're familiar with).
- Can I be sure that a return inside a switch statement will just return, at once?
- Can I get the initial focus on a component once the flash movie is loaded, without keyboard interaction from my part? without random errors once in a while? without upgrading to bleeding edge?
- Can I get a simple even bare layout manager interface without plugging stuff directly inside some updateDisplayList method? Or without managing myself couple of "drawing delegates"?
It looks like Flex has couple of issues with its FocusManager. All I wanted was setting the focus on a component at startup with a blinking cursor... Trivial right?
I was looking for an answer on Google as many seem to have that issue. I found a suggestion that seem to work :
But hey man, this is 2010, most web applications are past the time where a notice would be displayed "Only supported in Internet Explorer". Unless this is the web interface of your online banking accounts, you switch to an alternative immediately."Sorry man, I do not use Windows, so how could I use I.E??".
When going back to the initial screen, Flex 3.4 throws randomly errors in the FocusManager. It looks like that FocusManager bug got fixed(defaultButton issue), but my solution was to deactivate/activate the FocusManager myself :
- Initial screen
- Leaving the initial screen(Avoid some null errors on the defaultButton if you use that)
- Going back to the initial screen(Avoid some null errors on the defaultButton if you use that)