Forgive a newbie question, but I'm having some trouble getting my Text
Event listener to work properly.  I want to get a callback whenever
the text changes in any way.  I was trying to add a listener:

myTextField.addEventListener(TextEvent.TEXT_INPUT, textChanged);

and 

public function textChanged(e:Event):void
{
  testLabel.text = myTextField.text;
}
(in reality, I'd want to do something more advanced with the updated
text, but for now, let's stick to this)

Whenever this callback gets called, however, it uses the "old" text.

That is, if I type 'a' then 'b' in the text field, testLabel will
display just 'a'


Also, the TextEvent.TEXT_INPUT only gets called when text is added,
and I can't find any callback for when text is added, deleted, or
changed in any way.  Does such a thing exist, or do I need a
completely new approach?

thanks,
-andy





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to