Hi Alex,

Thanks for your reply. The problem is now that if I have the same method
called from both the text inputs then the application is going into a
recursive loop.

The application source code is attached for reference:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">

<mx:Script>
 <![CDATA[
   import mx.controls.Alert;
  private function validateField(event:Event):void{
     if (TextInput(event.currentTarget).text == "abc"){

      } else {
          callLater(event.currentTarget.setFocus);
      }
   }
 ]]>
</mx:Script>

  <mx:TextInput id="firstInput" focusOut="validateField(event)"/>
  <mx:TextInput id="secondInput" focusOut="validateField(event)"/>
</mx:Application>

Regards,

Harsha

Reply via email to