在数组中访问我的对象属性

|
    var row = Ti.UI.createTableViewRow({height:50});
    var rowData = [];
    row.add(PrimeSuiteUserName);
    row.add(PrimeSuiteUserPassword);
    Ti.API.info(\"HelloRow\" +row);
    rowData[0] = Object.property1;
    rowData[1] = Object.property1;
    Ti.API.info(\"Hello\" +rowData);
当我提醒行对象时,我得到了这个...
HelloRow[Ti.UI.TableViewRow]
如何访问数组中的行对象属性。     
已邀请:
尝试这个。
// section index
var sectionIndex = 0;

// row index
var rowIndex = 0

// without label or childfield
rowtitle = yourTableView.data[sectionIndex].rows[rowIndex].title;
Ti.API.info(\"HelloRow \" +rowtitle);

// child index
var childIndex = 0;

// with label or childfield
var text = yourTableView.data[sectionIndex].rows[rowIndex].children[childIndex].text;
Ti.API.info(\"HelloRow \" +text);
    

要回复问题请先登录注册