rem: lastIndex = DictionaryList.getAttribute("length") - 1; 
add: var lastIndex = dialog.DictionaryList.getAttribute("length") - 1; 
context: function ResetSelectedItem(index){  lastIndex = 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");  DictionaryList.selectedIndex = index;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/161c2cb661aa24e778ed127b600c7d800a224e6c/EdDictionary.js/buggy/editor/ui/dialogs/content/EdDictionary.js