Dear Sajid,
To avoid firing the said event unwantedly, you can use a boolean field in your class (derived from Form).
Code:
//field declaration
boolean eventFired = false;
//Now in the event handler
if (!eventFired) {
//set the field to true so this event handler will
//return as soon as called afterwards
eventFired = true;
//do your processing...
//change the text which will again fire this event
//but since the value of the eventFired field will
//be true, as soon as this event is fired the second
//time, it will return without doing anything
//now after doing all processing needed, reset the
//eventFired field, so future events are processed
eventFired = false;
}
I hope this helps.
Regards,
ejan