!7 !include #1001372 // direct nohupJavax static MultiMap index = caseInsensitiveMultiMap(); static AutoComboBox cbInput; static JButton btnTeach; p-subst { showCAL_defaultSize(700, 450); thread { downloadTypicalWebs(); updateIndex(); } centerBiggerConsole(); cbInput = replaceConsoleInputWithAutoComboBox(); bot(); consoleInput("George Bush"); addAskButton(); focusInput(); showControls(jcenteredline(btnTeach = jbutton("", f makeDiagram)); onUpdateAndNow(consoleInputField(), r { S s = consoleInput(); setText(btnTeach, "I want to teach" + (empty(s) ? "" : " about " + s)); }); calcOnConceptChangesInOtherProgram(circlesEditorDBID(), 1000, f updateIndex, true); sleepIfMain(); } svoid makeDiagram { thread { loading { startCirclesEditor(); send("Circles Editor.", "new diagram with node *", consoleInput()); } } } svoid updateIndex { print("Updating index."); index = dwlw_fullNodeIndex_ci(); updateAutoComboBoxItems(cbInput, keys(index)); consoleStatus(n(countDistinct(values(index), 'web), "web")); } answer { s = trim(s); L nodes = index.get(lower(s)); if (nempty(nodes)) { showWeb(s, web_dropVisUnlessLoaded(cloneWeb(first(nodes).web))); ret "Found " + n(nodes, "node"); } ret "No information found - please enter some!"; }