Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

eventListener Crashes (Error log NSExeption)

var win4 = Titanium.UI.createWindow({  
    //title:'Favourites',
    backgroundColor:'#000',
    barImage:'titles/titleSettings.png',
    title:null
});
var tab4 = Titanium.UI.createTab({  
    icon:'icons/icoSettings.png',
    title:'more',
    window:win4


});


var label4 = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 4',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});

var tabevent = win4.addEventListener('focus',function(e){     

tabGroup.removeTab(tab1);  
tabGroup.removeTab(tab2);
tabGroup.removeTab(tab3);    
win4.removeEventListener('focus',tabevent);


        });

runs but when i click tab4 and win4 loads is crashes can anyone tell me why?

— asked September 24th 2010 by Alan Young
  • eventlistener
  • iphone
  • removeeventlistener
  • tab
  • win
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.