|
Thank you very much. I will try to implement.
Thanks! -----Original Message-----
No, because it only fires if the focusOut event fires. Check it:
function initComponent() { my_ti.addEventListener("change", this); my_ti.addEventListener("focusOut", this); textDirty = false; }
function change() { textDirty = true; }
function focusOut() { if(textDirty) { textDirty = false; dispatchEvent({type: "changeAndFocusOut", target: this}); } }
----- Original Message ----- From: Doodi, Hari - BLS CTR Sent: Monday, November 28, 2005 4:13 PM Subject: RE: [flexcoders] TextInput control
I totally agree with you and infact I am planning to do so. But my concern is If I have some code, like assigning value to dirtyFlag, in change event then that code will be executed several times – if I am enter a text of 150 char then that assignment code will be executed 150 time. Which is a over load on system. Don’t you agree with me???
Thanks! -----Original Message-----
There is no such event. You'll need to create your own dirtyFlag that gets set to true when the change occurs, and have focusOut inspect if the dirtyFlag is true, and if so, fire your new "changed and focus out" event.
----- Original Message ----- From: Doodi, Hari - BLS CTR Sent: Monday, November 28, 2005 3:54 PM Subject: RE: [flexcoders] TextInput control
If I use focus – this event fire irrespective of whether content is modified or not. I don’t want this to happen. I want an event which should fire up only if content changed and tab out.
Thanks! -----Original Message-----
focusOut
----- Original Message ----- From: Doodi, Hari - BLS CTR Sent: Monday, November 28, 2005 3:42 PM Subject: [flexcoders] TextInput control
Hi, Can some one suggest me which event is the best event to handle a situation like - user changes the content of textinput and tabs out of it ? I tried “change” event and found that this event is firing for each change, meaning for every key board press while entering text in it. I don’t want this. What I am looking for is an event which fires only one time when user changes existing content and tabs out.
Thanks!
|

