Posts in Category "Uncategorized"

TextInputs, StageTexts, & Scrollers (oh my!)

Any scrollers I’ve used (up until today) on mobile devices have been through lists, so I have created my own custom ItemRenderers.

Well, today I decided to be lazy and just add TextInput controls, along with labels and spacers, directly into a VGroup.

Compiled, debugged, and tested, all will great success….. until I tried to actually put text in the text boxes!!!
If you enter text, you get very odd text placement, and often the text will disappear entirely:



Well fancy that!

I did some digging and found out it’s intentionally this way, for performance reasons.  The parent component for TextInput and TextArea is StageText, which really REALLY hates scrollers (must have done something to StageText as a child!).

It’s a pretty straightforward fix: Adobe provides a custom skin that will heal the hatred, and all you need to do is reference it, like so:

@namespace s "library://";
.myTextInputStyle {
skinClass: ClassReference("");
.myTextAreaStyle {
skinClass: ClassReference("");


Then add a reference to your TextInput / Text Area Field:


<s:TextInput id="txtSignName" width="415" styleName="myTextInputStyle"/>



I get the logic behind it – mostly because let’s face it, how often are you NOT going to reskin / use an ItemRenderer?- but it’s still pretty troublesome to find the solution.
(btw, I got the answer from the Adobe Flex 4.6 reference, found here)

I’m curious to see down the road, as processors get faster in tablets, what the default settings will be. I suspect we’ll find that settings/optimizations like this will become increasingly rare as performance improves.




After a good, solid year under my belt, I’m ready to start sharing some of the excitement I’ve felt since joining the Adobe team.


We’ll have code snippets, walkthroughs, product / book reviews, and of course the obligatory ramblings that we all delude ourselves into thinking are interesting and poignant pieces of blogging art.

Stay tuned, and I hope you find at least some of the posts inspiring or at the very least helpful in some way.