Hi.
I have a tabgroup with 4 tabs in a tabgroup.
In each of those tabs i have like 3-4 links to new windows and so on....
How can i open those windows and stay in the same tab?
If i use
tab1.add(new_win); new_win.open():I get: "Tab1 not defined" error
And if i use
Titanium.UI.currentTab(new_win);i get "CurrentTab is not a function".
So how do i do it?
I open all my windows with
modal:true, fullscreen : true, navBarHidden : trueWould that matter?
Thanx.
1 Answer
Ti.UI.currentTab is definitely not a function. I think it is supposed to be a reference to the current tab. But AFAIK, it doesn't work anyway. If it did work, you could do this:
Ti.UI.currentTab.open (new_win);But since it doesn't work, I think you should forget about trying to use it. You need to keep track of the tabGroup in a global variable and call
getActiveTab() on it. Then call open() on that active tab.
Please see my post here. In that post, I present a "TabGroup Window Manager" that abstracts away the cross-platform differences and the need to keep track of the tab group. Note that you MUST use a pure CommonJS module approach in your app (you should be anyway) for my code to work.
Your Answer
Think you can help? Login to answer this question!