On 4/15/05, Doodi, Hari - BLS CTR <[EMAIL PROTECTED]> wrote:

> can I trap any event
> before "change" event can occur so that I can display confirmation alert and
> act accordingly.

You'll have to extend the TabNavigator and override the selectedIndex setter.

<!-- MyTabNavigator.mxml -->
<?xml version="1.0"?>
<mx:TabNavigator xmlns:mx="http://www.macromedia.com/2003/mxml";
  xmlns="*">
  <mx:Script>
    var savedSelectedIndex:Number;
    public function set selectedIndex(value:Number):Void
    {
      savedSelectedIndex = value;
      tabBar.selectedIndex = super.selectedIndex;
      confirm("Are you really, really sure?");
    }
  </mx:Script>
</mx:TabNavigator>

In your alert handler you set the selectedIndex to the
savedSelectedIndex (if the user clicked OK).

-- 
[EMAIL PROTECTED]
http://manish.revise.org/


 
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