On Tue, 4 Oct 2022 20:15:47 GMT, Andy Goryachev <[email protected]> wrote:
>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LambdaMultiplePropertyChangeListenerHandler.java >> line 183: >> >>> 181: consumer.accept(v); >>> 182: } >>> 183: }); >> >> beware: unregister removes _all_ listeners (of type InvalidationListener) >> from the given property > > this makes no sense! thank you for pointing it out. > perhaps we really *ought to* create a better > LambdaMultiplePropertyChangeListenerHandler implementation. well, it _does_ make sense for listeners registered on properties of the control itself (they don't change and are un/registered once) - and that was it was designed for :) What it can't handle (and was not designed for) are dynamic multiple un/registration of listeners. ------------- PR: https://git.openjdk.org/jfx/pull/906
