rem: var selIndex = gDialog.DictionaryList.selectedIndex; if (selIndex >= 0) 
add: var selItem = gDialog.DictionaryList.selectedItem; if (selItem) 
context: function ReplaceWord(){  if (ValidateWordToAdd())  {    var selIndex = gDialog.DictionaryList.selectedIndex;    if (selIndex >= 0)    {      gSpellChecker.RemoveWordFromDictionary(GetSelectedTreelistValue(gDialog.DictionaryList));      try {        // Add to the dictionary list        gSpellChecker.AddWordToDictionary(gWordToAdd);        // Just change the text on the selected item        //  instead of rebuilding the list        ReplaceStringInTreeList(gDialog.DictionaryList, selIndex, gWordToAdd);      } catch (e) {        // Rebuild list and select the word - it was probably already in the list        dump("Exception occured adding word in ReplaceWord\n");        FillDictionaryList();        SelectWordToAddInList();      }    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/edb94adb7481a02a639fde26991acbb6c09fe391/EdDictionary.js/clean/editor/ui/dialogs/content/EdDictionary.js