aimozg
07/16/2018, 2:07 PMcarlw
07/16/2018, 2:08 PMaimozg
07/16/2018, 2:10 PMonChangeWeak
extension which returns the listener that should be saved somewheregtnarg
07/16/2018, 2:10 PMaimozg
07/16/2018, 2:11 PMprivate val weakListeners = ArrayList<Any>()
//...
contextualCurrentProperty.onChangeWeak { cts ->
// ...
}.addToList(weakListeners)
carlw
07/16/2018, 2:11 PMaimozg
07/16/2018, 2:11 PMaimozg
07/16/2018, 2:14 PMgtnarg
07/16/2018, 2:17 PMaimozg
07/16/2018, 2:17 PMaimozg
07/16/2018, 2:18 PMaimozg
07/16/2018, 2:18 PMaimozg
07/16/2018, 2:19 PM(children as? ObservableList<T>)?.addListener(ListChangeListener { change ->
check if item
is still inside... TreeView is not accessible at the moment but is at the call site (TreeView<T>.populate)carlw
07/16/2018, 2:22 PMcarlw
07/16/2018, 2:23 PMcarlw
07/16/2018, 2:23 PMgtnarg
07/16/2018, 2:24 PMaimozg
07/16/2018, 2:24 PMaddListener { lambda never tracked anywhere }
quite oftenaimozg
07/16/2018, 2:26 PMaimozg
07/16/2018, 2:28 PMaimozg
07/16/2018, 2:29 PMequals()
and the listener isn't bound to Baimozg
07/16/2018, 2:29 PMaimozg
07/16/2018, 2:30 PMgtnarg
07/16/2018, 2:31 PMcarlw
07/16/2018, 2:31 PMcarlw
07/16/2018, 2:32 PMaimozg
07/16/2018, 2:33 PMcarlw
07/16/2018, 2:35 PMaimozg
07/16/2018, 2:36 PMequals(newValue)
, but they are separate observable lists