!7 srecord Definition(S word, S definition) {} module DefinitionsByVoice > DynObjectTable { start { dontPersist(); fieldsInOrder = true; dm_onTopInput(voidfunc(fS s) { reactTo(s) }); reactTo(dm_getTopInput()); } void search(fS s) { addAll(map(func(S def) -> Definition { Definition(s, def) }, dm_getDefinitions(s))); } // API void reactTo(fS s) enter { switch to q(); clear(); search(s); new Matches m; for (S x : matchX_vbar_allRests("what is ...|what is the meaning of ...")) search(x); if (nempty(data)) dm_showModule_noFocus(); } }