我正在使用雷鸟代码库,目的是实现内联联系人编辑。当前代码Click
在树上捕获事件XUL
,如果是双击 ( events.detail == 2
),它会打开配置文件编辑器。我对其进行了修改以开始编辑当前的treeCell
,并且确实添加editable=true
到了相应的XUL
文档中。更新的代码读取
var orow = {}, ocolumn = {}, opart = {};
gAbResultsTree.treeBoxObject.getCellAt(event.clientX, event.clientY,
orow, ocolumn, opart);
var row = orow.value, column = ocolumn.value.index;
if (row == -1)
return;
if (event.detail == 2)
gAbResultsTree.startEditing(row, column);
不幸的是,当代码到达startEditing
部件时,它返回
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsITreeView.isEditable]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: chrome://global/content/bindings/tree.xml :: startEditing :: line 337" data: no]
我在这里几乎迷路了。有更多 XUL 经验的人可以提供帮助吗?谢谢!