Hi hi.
// tab closing problem when using onTabClose event
viewport.tabbar.onTabClose = function() {
// decrease tab counter
viewport.tabbar.numRows–;
// unset tabbar when empty to get a clean, nice screen
// reattach again when a new tab gets created
if(0==viewport.tabbar.numRows) {
viewport.cells(“b”).detachObject();
viewport.tabbar=null;
}
}
viewport.tabbar.attachEvent(“onTabClose”, viewport.tabbar.onTabClose);
Thats the code.
My question: why is onTabClose fired for every tab?
There are 3 tabs opened, and all tabs + tabbar itsself closed when i only close 1 tab.
I mean, i close one! tab, and therefore one! close event should be fired.
It seams that 3 events are fired.
If its not a bug and not my fault (could be) its a big design prob.
Some ideas?
Use 3.5, compiled lib.