!7 cmodule ConfirmAction > DynModule { S text; transient Runnable action; start { onUserUtterance(s -> { if "yes" yes(); }); } visual withCenteredButtons( dm_label text(), "Yes", rThread yes, "No", rThread reset); void reset enter { setField(text := "", action := null); } void yes enter { if (action == null) ret; print("Running action: " + text); Runnable r = action; reset(); callF(r); } // API void showAction(S text, Runnable action) { setFields(+text, +action); } }