Ok, thanks!

Currently I use such a workaround:

subjectTextInput.mx_internal::getTextField().dispatchEvent(*new* Event(
Event.CHANGE));
Is it good workaround or something better exists?

Sergey.


On 5/30/07, Alex Harui <[EMAIL PROTECTED]> wrote:

   CHANGE and CLICK are UI events.  They only fire when the user interacts
with the control and not on programmatic changes.  That prevents you from
having lots of logic to ignore change events when initializing the controls
as well.  Unfortunately, this means that it is a bug that the TextArea
controls don't update when you change TextRange.  Please file a bug for that
at www.adobe.com/go/wish.



-Alex


 ------------------------------

*From:* [email protected] [mailto:flexcompone
[EMAIL PROTECTED] *On Behalf Of *Sergey Kovalyov
*Sent:* Wednesday, May 30, 2007 8:45 AM
*To:* [email protected]
*Subject:* [flexcomponents] Why replaceText() method of TextField doesn't
dispatch Event.CHANGE?



Hi All!



Why replaceText() method of TextField doesn't dispatch Event.CHANGE? Due
to this when I use TextRange class within either TextInput or TextArea,
their respective text and htmlText properties doesn't change until manual
input. TextRange text setter implementation looks like this:



*public* *function* *set *text(value:String):* void*

{

textField.replaceText(beginIndex,endIndex,value);

endIndex = beginIndex + value.length;

}

Therefore after replaceText() call TextInput and TextArea remain
uninformed about such a change and their _text and _htmlText doesn't change.

Sergey.



Reply via email to