static SimpleLiveValue dm_fieldLiveValueWithParseFunction(S fieldName, IF1 parseFunction) { ret dm_fieldLiveValueWithParseFunction(dm_current_mandatory(), fieldName, parseFunction); } static SimpleLiveValue dm_fieldLiveValueWithParseFunction(DynModule module, S fieldName, IF1 parseFunction) { lock module.lock; temp module.enter(); // for dm_watchField Class type = getFieldType(module, fieldName); SimpleLiveValue value = new(type, get(module, fieldName)); dm_watchField(fieldName, r { O o = get(module, fieldName); value.set(o); }); value.onChange(r { module.setField(fieldName, parseFunction.get(value!)); }); ret value; }