rem: var item = gDialog.AddJSEAttributeTree.selectedItems[0]; 
add: var item = getSelectedItem(gDialog.AddJSEAttributeTree); 
context: function RemoveJSEAttribute(){  var treechildren = gDialog.AddJSEAttributeTree.lastChild;  // This differs from HTML and CSS panels:   // We reselect after removing, because there is not  //  editable attribute name input, so we can't clear that  //  like we do in other panels  var newIndex = gDialog.AddJSEAttributeTree.selectedIndex;  // We only allow 1 selected item  if (gDialog.AddJSEAttributeTree.selectedItems.length)  {    var item = gDialog.AddJSEAttributeTree.selectedItems[0];    // Name is the text of the treecell    var attr = GetTreeItemAttributeStr(item);    // remove the item from the attribute array    if (newIndex >= (JSEAttrs.length-1))      newIndex--;    // remove the item from the attribute array    JSERAttrs[JSERAttrs.length] = attr;    RemoveNameFromAttArray(attr, JSEAttrs);    // Remove the item from the tree    treechildren.removeChild (item);    // Reselect an item    gDialog.AddJSEAttributeTree.selectedIndex = newIndex;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/07d96867f11683becf5e1a6ca5e64e6a9324c957/EdAEJSEAttributes.js/buggy/editor/ui/dialogs/content/EdAEJSEAttributes.js