我想获取选定树单元的值,但我得到“tbo.getCellAt 不是函数”错误,当我添加QueryInterface
函数时,我得到Erreur : NS_NOINTERFACE: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]
这就是我正在使用的:
function onTreeClicked(event){
var tree = document.getElementById("treeChildren_links");
var tbo = tree.treeBoxObject;
var row = { }, col = { }, child = { };
//~ tbo.QueryInterface(Components.interfaces.nsITreeBoxObject);
tbo.getCellAt(event.clientX, event.clientY, row, col, child);
var cellText = tree.view.getCellText(row.value, col.value);
alert(cellText);
var redText = getMainWindow().document.getElementById(cellText);
redText.scrollIntoView("true");
}
我究竟做错了什么?
谢谢。