sclass FieldVar extends VarWithNotify {
IHasChangeListeners containingObject;
S fieldName;
IF0 getter;
IVF1 setter;
*(IHasChangeListeners *containingObject,
S *fieldName, IF0 *getter, IVF1 *setter) {
containingObject.onChangeAndNow(l0 _updateFromObject);
}
void _updateFromObject {
set(getter!);
}
public void fireChange :: before {
setter.get(get());
}
public selfType onChange(IVF1 r) {
if (r != null) onChange(-> r.get(get()));
this;
}
}