<@U25U0KPFT> This still has the issue that the bin...
# tornadofx
e
@carlw This still has the issue that the binding from the last item this fragment was used for will still be connected. Either it has to be disconnected (I think I put up an example for that) or we have to reintroduce the ViewModel. By the way, the
contentLabel.toggleClass
line should be outside the
itemProperty.onChange
- it doesn't need to be reapplied when the item changes. I think the TornadoFX ViewModel is not very well suited for mediating between Views in it's current implementation actually. Right now a better word for it would probably be
EditModel
, since it doesn't observe changes to the properties it wraps, and that it needs a commit to happen for changes to be pushed back to the underlying object. This use case would be easier solved with a more direct view model. I will create an example and show you what I mean tomorrow. Wow, this little app has made me realize a lot of shortcomings for the ViewModel. It might just need an
immediate
mode though. Will be looking at that tomorrow as well.