_Screen.DestroyIf you issue it again, a wait window will confirm the object is no longer there. Why then does _Screen still access the hooked method and how do I un hook it? (Notice that an attempt is made in the code but this does not work)
_SCREEN.AddObject('oHook', 'ScreenHook') DEFINE CLASS ScreenHook AS Custom oScreen = _Screen PROCEDURE INIT This.oScreen = _Screen ENDPROC PROCEDURE Destroy WAIT WINDOW 'Destroy Hook' This.oScreen = NULL ENDPROC PROCEDURE oScreen.destroy IF TYPE('This.oHook') = 'O' IF VARTYPE(This.oHook) = 'O' WAIT WINDOW 'oHook exists' This.RemoveObject('oHook') ENDIF ENDIF WAIT WINDOW '_Screen Destroy' ENDPROC ENDDEFINE