Basically, I created a custom component that extends TextArea, and I
created a getter that returns the super.textField.


Right now, I am doing this:

private var savedText:String;
private var limitHit:Boolean = false;

keyDown(){
savedText = textArea.text;
var tf:TextField = TextField( (event.currentTarget as
LimitedTextInput).textField );
if( tf.numLines > 14 )
limitHit = true; 
}

keyUp(){
if( limitHit ){
textArea.text = savedText;
limitHit = false;
}
}

change(){
if( limitHit ){
textArea.text = savedText;
limitHit = false;
}
}


the problem is, if I hit the limit, I cannot go back and edit the
text, because limitHit is true and I need to know how to say "If it is
deleting or changing text that can fit, allow it"

Am I even doing this the correct way?

Reply via email to