wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

SuperTabNavigator index out of bounds #323

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create SuperTabNavigator (id=m_viewArea) and add 2 or more tabs
2. execute the following code:

while (m_viewArea.getChildren().length > 0) {
  m_viewArea.removeChild(m_viewArea.selectedChild as DisplayObject);
}

What is the expected output? What do you see instead?
After all tabs are closed an error occures (index out of bounds...)

There is a simple solution:
1. to the SuperTabNavigator.as, function ensureTabIsVisible add code:

if (this.selectedIndex < 0) {
  return;
}

Original issue reported on code.google.com by zeljko.kunica@gmail.com on 20 Jul 2010 at 7:17