Okay, fiddled around a bit with the PromptingTextInput control from
flexlib and you have to do two things to convert it to a
PromptingTextArea. Note that this solution is certainly not the only,
nor probably the best, but it's simple and it seems to work. Though, I
would like someone to tell me exactly WHY it works. What's going on
under the hood that requires this modification? Anyway, here's what I
did:
1. I added an initialization handler which explicitly sets the
TextArea's text property to null when empty:
private function onInitialize(event:FlexEvent):void
{
if (this.text.length == 0)
this.text = null;
}
2. I added ValidateNow() to the text setter:
[Bindable("textChanged")]
[CollapseWhiteSpace]
[NonCommittingChangeEvent("change")]
override public function set text( value:String ):void
{
_textEmpty = (!value) || value.length == 0;
super.text = value;
invalidateDisplayList();
validateNow();
}
So if someone knows what's going on here, it would be nice to know.
Best,
Bruce
--- In [email protected], "Bruce Denham" <[EMAIL PROTECTED]> wrote:
>
> Hey Everyone,
> I'm using Doug's PromptingTextInput (just downloaded it from flexlib
> -- too cool!) and have tried to convert it to a "PromptingTextArea"
> without success. Everything compiles just fine, but at runtime, it
> blows up my app in the place I'm using it. Basically all I've done so
> far is extend from TextArea instead of TextInput, but obviously it's
> not that easy. TextArea has some other things that may be gumming up
> the works.
>
> So if anyone has already created a working PromptingTextArea or knows
> what may be causing the problem, let us all know.
>
> Thanks,
> Bruce
>