rem:  window.spellChecker = spellChecker; 
context: function Startup(){  if (!InitEditorShell())    return;  dump("EditorShell found for Spell Checker dialog\n");  // Get the spellChecker shell  spellChecker = editorShell.QueryInterface(Components.interfaces.nsIEditorSpellCheck);  if (!spellChecker) {    dump("SpellChecker not found!!!\n");    window.close();  }  // Save as a property of the window so it can be used by child dialogs  window.spellChecker = spellChecker;  // Create dialog object to store controls for easy access  dialog = new Object;  if (!dialog)  {    dump("Failed to create dialog object!!!\n");    window.close();  }  dialog.MisspelledWordLabel = document.getElementById("MisspelledWordLabel");  dialog.MisspelledWord = document.getElementById("MisspelledWord");  dialog.ReplaceWordInput = document.getElementById("ReplaceWord");  dialog.SuggestedList = document.getElementById("SuggestedList");  dialog.LanguageMenulist = document.getElementById("LanguageMenulist");  if (!dialog.MisspelledWord ||      !dialog.ReplaceWordInput ||      !dialog.SuggestedList  ||      !dialog.LanguageMenulist )  {    dump("Not all dialog controls were found!!!\n");  }  // NOTE: We shouldn't have been created if there was no misspelled word    // The first misspelled word is passed as the 2nd extra parameter in window.openDialog()  MisspelledWord = window.arguments[1];    if (MisspelledWord.length > 0) {    dump("First misspelled word = "+MisspelledWord+"\n");    // Put word in the borderless button used to show the misspelled word    dialog.MisspelledWord.setAttribute("value", MisspelledWord);    // Get the list of suggested replacements    FillSuggestedList();  }  // Initial replace word is the misspelled word;  dialog.ReplaceWordInput.value = MisspelledWord;  if (dialog.LanguageMenulist)  {    // Fill in the language menulist and sync it up    // with the spellchecker's current language.    var curLang;    try {      curLang = spellChecker.GetCurrentDictionary();    } catch(ex) {      dump(ex);      curLang = "";    }    InitLanguageMenu(curLang);  }  DoEnabling();  dialog.SuggestedList.focus();  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/c0a534c8efb9e6703626cacd6d61cb6ad8eb6680/EdSpellCheck.js/buggy/editor/ui/dialogs/content/EdSpellCheck.js