well.
Trash thing : i have the same result than before : null pointer exception. it was the same when i use removeAllRow().
there is no object betwin the moment you delete all and you put new one. (ty Captain obvious).so i have a null pointer exception.
here is my solution ,maybe not the best one ever. but effective. just put in a variable the number of rows you have, delete it AFTER you put new value.
function pickercapteur(table)
{
Ti.API.info("capteur ok");
var taille;
test = column3.getRows();
if (test != null)
{
taille = test.length -1;
}
//Ti.API.info(column3.getRowCount());// ! NE MARCHE PAS SI NULL ET PLANTE L'APPLI !
for(var i=0, ilen=table.length-1; i<ilen; i++){
var row = Ti.UI.createPickerRow({title: table[i]});
column3.addRow(row);
}
if (taille != null)
{
for (var i = taille; i >= 0; i--){
column3.remove(test[i]);
};
}
addpickercapteur();
}
Hope that will help some people who encounter the same problem. Have a nice day.