I came across this thread looking for how to hide a tab and came to the same conclusion as Erik, but then after looking at more documentation realized that, as Lyuts hinted very subtly earlier that it is through the removeTab() that you "hide" the tab. You can then addTab() later. If it was already included in the ui object, then you can always reference it from there and you don't need to store another reference.
Just thought I'd thrown in my comment to help any future seekers of the same answer as the removeTab seems to imply that it will be forever removed (despite the thread being 3 years old).
Bookmarks