I'm stuck on a problem with the option dialog whenever I use it for the second time the option I selected from the first time is still highlighted and I can't seem to undo this. Does anyone know a solution for this problem?
i summon the optiondialog by a tableview click event
var option = Ti.UI.createOptionDialog({
title: 'Verander Status',
options:['Afgerond','Bezig','NVT','Cancel'],
cancel:3
});
option.addEventListener('click',function(e){
var naam = t1;
var db = Ti.Database.open('Opleiding');
if( e.index == 0){
db.execute('UPDATE ICTVAKKEN SET status ="A" WHERE Name =? ',naam);
}
if(e.index == 1){
db.execute('UPDATE ICTVAKKEN SET status ="B" WHERE Name =? ',naam);
}
if(e.index == 2){
db.execute('UPDATE ICTVAKKEN SET status ="N" WHERE Name =? ',naam);
}
Gettable();
db.close();
});
0 comments:
Post a Comment