How do I set the current tab to tab 1 and delete tab 0 programatically?
The Kitchen Sink App demos this in the tabgroups bit of the base ui tab....
var win = Titanium.UI.currentWindow;
// get tab group object var tabGroup = win.tabGroup;
var newtab = tabGroup.tabs; tabGroup.removeTab(newtab);
however I have seen collection mutated whilst enumerating errors doing this - any combination of setActiveTab and removeTab will occasionally result in the error.
I can only assume that the re-draw is doing the enumeration - In fact I have not found a way of removing tabs that does not create an error.
I now create a new tabgroup and close the old one (and trust that the JS / titanium / native stuff deals with GC / memory nicely)
Think you can help? Login to answer this question!