How to simulate an efficient OnAttach/OnDetach event?

Ok, I understand, thank you very much for your help!! very appreciated!!