rem: toolkitCore = XPAppCoresManager.Find("ToolkitCore"); if (!toolkitCore) { toolkitCore = new ToolkitCore(); if (toolkitCore) toolkitCore.Init("ToolkitCore"); } if(!toolkitCore) { dump("toolkitCore not found!!! And we can't close the dialog!\n"); }  
context: function Startup(){  dump("Doing Startup...\n");  toolkitCore = XPAppCoresManager.Find("ToolkitCore");  if (!toolkitCore) {    toolkitCore = new ToolkitCore();    if (toolkitCore)      toolkitCore.Init("ToolkitCore");  }  if(!toolkitCore) {    dump("toolkitCore not found!!! And we can't close the dialog!\n");  }  // NEVER create an edAppCore here - we must find parent editor's  // temporary while this window is opend with ShowWindowWithArgs  dump("Getting parent appcore\n");  var editorName = document.getElementById("args").getAttribute("value");  dump("Got editorAppCore called " + editorName + "\n");  edAppCore = XPAppCoresManager.Find(editorName);    if(!edAppCore || !toolkitCore) {    dump("EditoredAppCore not found!!!\n");    toolkitCore.CloseWindow(window);  }  dump("EditoredAppCore found for Spell Checker dialog\n");  // Create dialog object to store controls for easy access  dialog = new Object;  if (!dialog)  {    dump("Failed to create dialog object!!!\n");    toolkitCore.CloseWindow(window);  }  dialog.wordInput = document.getElementById("Word");  dialog.suggestedList = document.getElementById("SuggestedList");  dialog.languageList = document.getElementById("");  if (!dialog.wordInput ||      !dialog.suggestedList  ||      !dialog.languageList )  {    dump("Not all dialog controls were found!!!\n");  }  // NOTE: We shouldn't have been created if there was no misspelled word    misspelledWord = edAppCore.getFirstMisspelledWord();    if (misspelledWord != "") {    dump("First misspelled word = "+misspelledWord+"\n");    // Put word in input field    dialog.wordInput.value = misspelledWord;    FillSuggestedList();  } else {    dump("No misspelled word found\n");  }  dialog.suggestedList.focus();  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a152976669b5eefdf918a3c66ac8ee8458d41637/EdSpellCheck.js/clean/editor/ui/dialogs/content/EdSpellCheck.js