android - add picker in tableViewRow error -
i'm working on selector on tableviewrow, works perfect, when choosing pickerrow repeated in row 4. idea why happens?
this latest version android titanium studio
var tipo = ti.ui.createpicker({ width:'15%', right:30, top:0 }); caja.add(tipo); /* var columtipo = ti.ui.createpickercolumn({ }); tipo.add(columtipo); */ //var rowpromo = []; var data = []; var db = ti.database.open("elite.db","elite"); var selectpromo = db.execute('select * promotion_types'); var = 0; while(selectpromo.isvalidrow()) { i++; var rowpromo = ti.ui.createpickerrow({title:selectpromo.fieldbyname('name')}); //tipo[obj.numero].add(rowpromo[i]); data.push(rowpromo); selectpromo.next(); } tipo.add(data); tipo.selectionindicator = true; tipo.addeventlistener('change',function(e) { //e.setbackgroundcolor('#ccc'); alert('promo'+e.selectedvalue); })
Comments
Post a Comment