From f8a3d56fcfa9f04a48c2b70485e391ba120f413e Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 20 Dec 2007 11:52:42 +0000 Subject: [PATCH] LCL: TApplicationProperties: fixed removing events git-svn-id: trunk@13399 - --- lcl/include/applicationproperties.inc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lcl/include/applicationproperties.inc b/lcl/include/applicationproperties.inc index 2f98d9c988..ca854ee60a 100644 --- a/lcl/include/applicationproperties.inc +++ b/lcl/include/applicationproperties.inc @@ -303,8 +303,21 @@ end; destructor TApplicationProperties.Destroy; begin - If not (csDesigning in ComponentState) then - Application.RemoveAllHandlersOfObject(Self); + If not (csDesigning in ComponentState) then begin + Application.RemoveOnExceptionHandler(FOnException); + Application.RemoveOnIdleHandler(FOnIdle); + Application.RemoveOnIdleEndHandler(FOnIdleEnd); + Application.RemoveOnEndSessionHandler(FOnEndSession); + Application.RemoveOnQueryEndSessionHandler(FOnQueryEndSession); + Application.RemoveOnMinimizeHandler(FOnMinimize); + Application.RemoveOnRestoreHandler(FOnRestore); + Application.RemoveOnDropFilesHandler(FOnDropFiles); + Application.RemoveOnHelpHandler(FOnHelp); + Application.RemoveOnHintHandler(FOnHint); + Application.RemoveOnShowHintHandler(FOnShowHint); + Application.RemoveOnUserInputHandler(FOnUserInput); + end; +//AG Application.RemoveAllHandlersOfObject(Self); "Self" is wrong, because Events is owner's methods inherited Destroy; end;