View Single Post
  #3 (permalink)  
Old 06-06-2008, 10:49 PM
Redden96
 
Posts: n/a
Diggs:
Default Re: tabNavigator selectedIndex not working

On Jun 3, 1:37 am, "John Hall" <webforumsu...@macromedia.com> wrote:
> I have reduced a problem I'm having to a very simple example. I'm using the
> routine in a validation of form, trying to make sure they don't leave the
> current tab index if a form is 'open.' It works the first time but after that,
> does not work every other time. Suggestions?
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
> <mx:Script>
> <![CDATA[
> import mx.controls.Alert;
> private function resetTab():void{
> tabNav.selectedIndex= 0;
> Alert.show("selected child should be tab1 but it's " +
> tabNav.selectedChild);
> }
> ]]>
> </mx:Script>
> <mx:TabNavigatorid="tabNav" x="48" y="35" width="200" height="200"
> change="resetTab();">
> <mx:Canvas label="Tab 1" width="100%" height="100%" id="tab1">
> </mx:Canvas>
> <mx:Canvas label="Tab 2" width="100%" height="100%" id="tab2">
> </mx:Canvas>
> </mx:TabNavigator>
> </mx:Application>


I'm having the same issue and have yet to find a solution. It is
slightly comforting to see that I'm not alone in my frustration.
Reply With Quote