The tabbar component’s new getNumberOfTabs() function appears to consistently claim that there is one more tab than actually exists. Even if there are no tabs on the tabbar, it returns 1 when called. While putting together the attached demo to show this problem, I noticed a second issue, where there is a delay between when a tab is closed and when the return value of this function updates. It’s not much, only about 150-200 milliseconds (seems to vary a bit), but it’s enough that other functions depending on an accurate result from this call may not work correctly.
The attached demo is using the standard edition of version 4.0.2, but I’ve observed this in the pro version as well. In the demo, you can add and delete tabs and see the last returned value of getNumberOfTabs() displayed on screen as you do so; the demo adds a slight (adjustable) delay between closing a tab and updating the value to update the second issue I mentioned.
TabbarBugDemo.zip (169 KB)