rem: if (profileList.selectedItems && profileList.selectedItems.length) { var selected = profileList.selectedItems[0]; var name = selected.getAttribute("rowName"); var previous = profileList.getPreviousItem(selected, 1); 
add: if (profileList.view.selection.count) { var selected = profileList.view.getItemAtIndex(profileList.currentIndex); var name = selected.getAttribute("profile_name"); var previous = profileList.currentIndex - 1; 
context: function DeleteProfile(deleteFiles){  var profileList = document.getElementById("profiles");  if (profileList.selectedItems && profileList.selectedItems.length) {    var selected = profileList.selectedItems[0];    var name = selected.getAttribute("rowName");    var previous = profileList.getPreviousItem(selected, 1);    try {      profile.deleteProfile(name, deleteFiles);      profileList.removeChild(selected);      if (previous) {        profileList.selectItem(previous);        profileList.ensureElementIsVisible(previous);      }      // set the button state      DoEnabling();    }    catch (ex) {      dump("Exception during profile deletion.\n");    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/97b2b7af1273ff0f6a722d514056886f4d4e2d5a/profileManager.js/buggy/profile/resources/content/profileManager.js