tableView
I have a tableview on which i attach a click event, but when i click on a row this event is being called many times (like 5 or 10). What am i doing wrong or how could i fix this. Here is the attachevent part of the code:
tableView.addEventListener('click',function(e) {
iNieuwsIndex = e.row.className.substring(13);
Titanium.API.info('Gebruiker heeft geklikt op element nummer: ' + iNieuwsIndex);
// Nieuw window aanmaken
var nieuwsDetailWindow = Titanium.UI.createWindow({
title:nieuwsberichten[iNieuwsIndex].titel,
backgroundColor:"#10193e",
url:'window_nieuws_detail.js',
nieuwsberichtObj:nieuwsberichten[iNieuwsIndex]
});
Titanium.UI.currentTab.open(nieuwsDetailWindow);
});