Hi Tom, it seems to me that in your custom DoubleBinding implementation `other` is not its dependency, thus it does not react to it's invalidations.
Tomas On Wed, May 21, 2014 at 9:25 PM, Tom Eugelink <[email protected]> wrote: > I came up with this: > > startXProperty().bind( *snap(*heightProperty().multiply(0.2)) ) > > > And then: > > private DoubleBinding snap(final ObservableNumberValue other, final > Observable... dependencies) { > return new DoubleBinding() { > { > super.bind(dependencies); > } > > @Override > public void dispose() { > super.unbind(dependencies); > } > > @Override > protected double computeValue() { > return NodeUtil.snap(other.doubleValue()); > } > > @Override > public ObservableList<?> getDependencies() { > return new > ImmutableObservableList<Observable>(dependencies); > } > }; > } > > But that always returns 0... I feel this should have worked. > > Tom
