Custom UIComponent extention in Flex and Keyboard Input

Filed under:Computing — posted by Nic "RedWord" Smith on September 19, 02008 @ 9:58 PM

I was having a hell of a time trying to get keyboard input to work for a custom UIComponent in Flex. Many messages on the web about this particular problem are not very helpful, don’t identify what’s going wrong, and tend to misidentify the problem as failing to call the super.keyDown() method. After determining that my UIComponent extension wasn’t receiving focus, I found this comment by Khelonium in the documentation:

I had a little problem when I tried to have focus working on my custom Components. The UIComponent class documentation looks like Focus is enabled by default, but it is not. To have Focus enabled you have to implement the IFocusManagerComponent , I have found the documentation(thanks to the mailinglist) here :
http://livedocs.macromedia.com/flex/2/docs/00001727.html

Chalk it up to boneheaded language design, poor choice of defaults, and bad documentation that this problem from no later than Sept 2006 is still confusing in 2008.

zero comments so far

Please won't you leave a comment, below? It'll put some text here!

Copy link for RSS feed for comments on this post

Sorry, the comment form is closed at this time.



image: detail of installation by Bronwyn Lace