I've got a simple TabbedViewNavigator with 2 tabs. After an event, I want to remove all the tabs and add new ones. I tried this code:
public function doIt():void {
trace('called');
this.tabbedNavigator.removeAll();
var vn1:ViewNavigator = new ViewNavigator();
vn1.firstView = views.HomeView;
vn1.label = "Home";
this.tabbedNavigator.addItem(vn1);
}
trace("app tabs");
this.tabbedNavigator.removeAll();
this.tabbedNavigator.validateNow();
var tab:ViewNavigator;
tab = new ViewNavigator;
tab.firstView = views.Cars;
tab.label = "Cars";
tab.percentHeight = 100;
tab.percentWidth = 100;
this.tabbedNavigator.addItem(tab);
Still getting RangeError: Index '1' specified is out of bounds.
at spark.components::TabbedViewNavigator/set selectedIndex(). Ill post on the bug forums but I wanted to see if anyone has a fix.
North America
Europe, Middle East and Africa
Asia Pacific
Copyright © 2012 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).