這個問題,更新最古老的主題https://stackoverflow.com/questions/20609650/titanium-columnpicker-removeallchildren-methode/20612209?noredirect=1#20612209鈦+ ColumnPicker&removeAllChildren V2
我有從ColumnPicker的removeAllChildren梅索德一個問題。 http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.PickerColumn-method-removeAllChildren
Thinqs to @ Krishna-Kumar,我接近我想要的結果。
function pickercapteur(table)
{
Ti.API.info("capteur ok");
var test = column3.getRows();
if(test != null)
{
for (var rowpicker in column3.getRows())
{
console.log(rowpicker);
column3.removeRow(rowpicker);
rowpicker =null;
}
}
for(var i=0, ilen=table.length-1; i<ilen; i++){
var row = Ti.UI.createPickerRow({title: table[i]});
column3.addRow(row);
}
addpickercapteur();
}
//Ti.API.info(column3.getRowCount());// ! if there is no row. it will CRASH appli instead of return 0, can't use it at the begin of my application!
//that why i use test!=null.
unfortnuatly,它不會刪除該內容,但我在控制檯消息:(你可以THINQ,是的,我在欄3 7對象時,我想刪除它)
[INFO][TiAPI (2672)] 0
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 1
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 2
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 3
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 4
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 5
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
[INFO][TiAPI (2672)] 6
[WARN][PickerColumnProxy(2672)] Unable to remove the row. Invalid type for row.
我嘗試removeselectedrow();但只有picker有這種方法,而不是Columnpicker。 我找不到任何解決方案將其刪除。
什麼是表格? –