!7 cmodule ConfirmAction > DynModule { S text; transient Runnable action; start { dm_onUserUtterance(s -> { if "yes" yes(); if "no" reset(); }); } visual withCenteredButtons( dm_label text(), "Yes", rThread yes, "No", rThread reset); void reset enter { setFields(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); } }