Is there an easier/more elegant way to watch for view model changes from arbitrary classes? I seem to be able to do it like this:
void bind() {
Trackable.track(new Tracker() {
@Override
public void update() {
System.out.println("Tracker#update");
bind();
}
}, new ReflectedProperty(model, "Name").getGetter()); // where model has get/setName
}
It feels nasty and verbose though.
Is there an easier/more elegant way to watch for view model changes from arbitrary classes? I seem to be able to do it like this:
It feels nasty and verbose though.