user278859
user278859

Reputation: 10519

Cannot get click="{ myTabNavigator.selectedIndex=3}" to work

I have a mx:TabNavigator with 5 tabs. As a secondary navigation option for the user there is a "Next" button on each tab that takes the user to the next tab. Each "Next" button uses click="{ myTabNavigator.selectedIndex=x}" set to move to the next tab where x is the tab number. All of them work except for the one on tab 2 which is supposed to take the user to tab 3. Nothing happens.

I can copy this button to tab 0 and it works fine taking the user to tab 3. It just will not work from tab 2.

I have tried moving myTabNavigator.selectedIndex=3; to an event handler and have confirmed that the click event is calling the event handler, but it doesn't work from there either.

I have cleaned the project, restarted Flash Builder and the browser and cleared the cache in the browser. Cannot get it to work.

Any suggestions?

Thanks,

John

Upvotes: 0

Views: 157

Answers (1)

user278859
user278859

Reputation: 10519

I found the problem. I found that the tab 2 itself had click="{EditDetailsTabNavigator.selectedIndex=2}" in it. Took this out and the button works. Guess every time I clicked in the tab it would fire.

Not exactly sure how it got there, but I have found when pasting into a property in Design mode that occasionally the paste goes some place else in addition to where I have the cursor. I think that is how it might have gotten there.

Upvotes: 1

Related Questions