I'm getting the following error in the console: [ERROR] Adding an event listener to a proxy that isn't already in the context
Using Titanium mobile on OSX Titanium SDK version: 2.0.1 (04/12/12 16:33 999c68a)
It only starts to show the error after clicking on on Tab1 then Tab2 then tab 1 again five or 6 times. It seems to run fine when moving the tab group code out of the module into app.js but not when created inside a module. My test case is:
In app.js I have:
var TestTabGroup = require('/ui/TestTabGroup'); var Test_tabs = new TestTabGroup(); Test_tabs.open();and in Resources/iphone/ui/TestTabGroup.js
function TestTabGroup() { var tabGroup = Ti.UI.createTabGroup(); var tab1 = Ti.UI.createTab({ title:'tab1', }); tabGroup.addTab(tab1); var tab2 = Ti.UI.createTab({ title:'tab2', }); tabGroup.addTab(tab2); return tabGroup; } module.exports = TestTabGroup;