thomasnield / DirtyFX

Dirty state-tracking properties and collections for JavaFX
Apache License 2.0
32 stars 3 forks source link

unbindBidirectional adds the listener instead of removing it #3

Open eismeraldo opened 4 years ago

eismeraldo commented 4 years ago

The class "DirtyStringProperty" in line 50 should be changed from: "override fun removeListener (listener: ChangeListener ?) = delegate.addListener (listener)" to: "override fun removeListener (listener: ChangeListener ?) = delegate.removeListener (listener)" Otherwise, the system throws the exception: "Exception in thread" JavaFX Application Thread "java.lang.RuntimeException: Should not reach here" Because I don't know Kotlin, I ask you to change this. Thank you Eismeraldo Image 6

For example, the correct behavior does not work in the case of a master detail view. Here an item can be displayed and edited in detail, then another one, then the previous one, in this case an exception is thrown.

thomasnield commented 4 years ago

Hi there, thanks for catching this. I will look into fixing this tomorrow.

GrolarDan commented 10 months ago

Hi @thomasnield, is there any possibility you will fix this? I like this library. It is so easy. It is in all simple dirty classes Just I'm now dependent on this issue.