Is there some problem with tabGroups and the Android Emulator?? The following code:
// open tab group tabGroup.open();Causes the Android Emulator to die:
The application ... has stopped unexpectedly. Please try again.Any suggestions appreciated...
2 Answers
Hi Donal,
Try to set your tab Icon path properly and clean build and uninstall from emulator and run again. If you are in app.js file then your image path would be like this
icon:'/images/a.png',sometime because of wrong path application crash in android.
My app.js says:
var loginWin = Titanium.UI.createWindow({ url:'controllers/login.js' }); loginWin.open();controllers/login.js:
Ti.include("../views/login.js"); Ti.include("../models/procedures.js"); var win = Ti.UI.currentWindow; var scrollView; var mainMenu = function(){ var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title:'window1', url:'window1.js' }); var tab1 = Titanium.UI.createTab({ icon:'../images/a.png', title:'Window One', window:win1 }); tabGroup.addTab(tab1); tabGroup.open(); }); var preloadData = function(){ var procModel = new Procedure(); procModel.loadInsurance( mainMenu ); }; scrollView = v_login.loginScreen( preloadData ); win.add( scrollView );models/procedures.js:
function Procedure (){ BaseDBModel.apply(this, arguments); this.loadInsurance = function(callback){ Ajax.GET('insurance/getInsurance', function(data){ Ti.App.Properties.setList('insurers', data); callback(); } ); }; }; Procedure.prototype = BaseDBModel;
Your Answer
Think you can help? Login to answer this question!