On Wed, 31 Aug 2022 16:54:32 GMT, Nir Lisker <nlis...@openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename showing property to shown as it is already used in subclasses > > modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java > line 259: > >> 257: * Returns an {@code ObservableValue} that holds this value >> whenever the given >> 258: * condition evaluates to {@code true}, otherwise holds the last >> value when >> 259: * {@code condition} became {@code false}. The value is updated >> whenever this > >> became `{@code false}` > > If it was `false` from the start then the observable still holds the initial > value. Maybe "was `{@code false}`"? What I'm trying to communicate here is that the last value held by the parent will be the value held by this observable at the time the condition becomes false. Perhaps more accurately: > Returns an `ObservableValue` that holds this value and is updated only when > the given condition evaluates to `true`. This also communicates that it will initially copy the value, and then keeps copying it for as long as condition is `true`. It also implies (with "updated") that the value will remain at the last copied value for the duration of the condition being `false`. > modules/javafx.base/src/main/java/javafx/beans/value/ObservableValue.java > line 260: > >> 258: * condition evaluates to {@code true}, otherwise holds the last >> value when >> 259: * {@code condition} became {@code false}. The value is updated >> whenever this >> 260: * {@code ObservableValue} changes, unless the condition currently >> evaluates > > Maybe it's a bit clearer to indicate when the value changes rather than when > it doesn't: > >> The value is updated whenever this `{@code ObservableValue}` changes and >> `{@code condition}` holds `{@code true}` Looks like we had the same thought here, I think if I change the first sentence it covers all of this. ------------- PR: https://git.openjdk.org/jfx/pull/830