Hi Folksss!!
Do you know any trick to intercept a Remove event triggered by User on removing a Module from Rack?
I’ve try the onRemove’s Widget method:
void onRemove(const RemoveEvent &e) override {
//
}
But it’s called in both case: when I remove the Module manually or when I normally close Rack, so I can’t really distinguish them.
Who know? 
Unfortunately you can’t.
What exactly do you want to do inside onRemove?
1 Like
Basically, restore an external module state.
I bet the only solution is to correctly save states and restore it conveniently.
pachde
(Paul Dempsey)
4
I also have a requirement to do some cleanup when a module is deleted, but not during shutdown or patch closing.
Perhaps the RemoveEvent
can contain a “reason” enum that tells us why it is being removed.