Closed xeruf closed 5 years ago
Yes, I am aware of this issue, painfully so. I wanted to port Widget.java to Kotlin before tackling this.
Only happens when the factory can not be found during deserialization.
Fixed in https://github.com/sghpjuikit/player/commit/8ee784233d3c7f6d72991b74cd9618416474c92d
This was not easy, but it did turn out simple.
I also managed to fix other nasty issues:
I think I can say that widgets now finally load/restore properly at all times. Enjoy.
Testing:
1
2
In all these cases, inputs/outputs should stay properly connected.
When I delete some widget folders, the widgets get replaced with "Empty" in the interface, so far so good. But when I restore these widgets, the "Empty" widgets stay. Ideally, the empty widgets would not be persisted, but instead the original widget that was at its place. That would require remembering the original widget data when such a replacing operation is done and then using it when serialising the widget. This would result in the application checking fir the existence of the widget every startup and potentially save the user quite a lot of hassle reconfiguring it.