!7 static SimpleLiveValue input = new(S); static L result; static new NotTooOften notTooOften; static int maxInputLength = 120; static transient JTable table; static transient ReliableSingleThread rst; static JComponent visualize() { ret table = sexyTableWithoutDrag(); } static void unvisualize2() { table = null; } p { input.onChange(rst = ReliableSingleThread(r doIt)); } svoid update { S s = (S) callOpt(creator(), 'getInterestingString); if (nempty(s) && l(s) <= maxInputLength) // TODO: more quality checks input.set(s); } static void doIt() { if (table != null && allowedToGoogleSomething()) dataToTable_uneditable(calc(), table); } static L calc() { L> l = quickGoogle2(input!); ret result = map(l, func(T3 t) -> SS { litorderedmap("Result" := second(t), "Desc" := third(t), "Link" := first(t)) }); } sbool allowedToGoogleSomething() { ret notTooOften.canDoAgain_willDoIfTrue(); }