<@U7BB83NPR> The explanation for your issue is qui...
# tornadofx
e
@Carlton Whitehead The explanation for your issue is quite simple: If you embed "subview" inside "mainview", then mainview will have it's onDock called when it's window is docked and subview will have it's onDock called when it is attached to mainview. However, when you close the window, only mainview is undocked from it's window. subview is still attached to mainview, so it will not receive any onUndock callback. If you later show mainview again, it will once again receive a call to onDock. subview has been docked to mainview the whole time, hence no onUndock callback.
c
What do you think about propagating the undock (hide) event downward? It’s really a Stage rather than a root event anyway
c
Thanks Edvin. That is pretty much what I worked out through experiment
Carl, I think that is more in line with what I originally expected from the framework.
With that said, having a distinct lifecycle from parent vs root attachment might make more sense
Altering the contract of dock/undock is liable to cause some breaking changes