rem: var lastIndex = gDialog.DictionaryList.getAttribute("length") - 1; 
add: var lastIndex = gDialog.DictionaryList.getRowCount() - 1; 
context: function ResetSelectedItem(index){  var lastIndex = gDialog.DictionaryList.getAttribute("length") - 1;  if (index > lastIndex)    index = lastIndex;  // If we didn't have a selected item,   //  set it to the first item  if (index == -1 && lastIndex >= 0)    index = 0;dump("ResetSelectedItem to index="+index+"\n");  gDialog.DictionaryList.selectedIndex = index;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/db9f2fff82069a9541ab1d6e59faab309c0f4fce/EdDictionary.js/buggy/editor/ui/dialogs/content/EdDictionary.js