IDEIntf: fixed TPropertyEditorHook compiling with -CR

git-svn-id: trunk@44897 -
This commit is contained in:
mattias 2014-05-03 09:00:32 +00:00
parent 6281c4adcf
commit fba12fd265

View File

@ -6255,7 +6255,8 @@ end;
procedure TPropertyEditorHook.AddHandler(HookType: TPropHookType;
const Handler: TMethod);
begin
if Handler.Code=nil then RaiseGDBException('TPropertyEditorHook.AddHandler');
if Handler.Code=nil then
RaiseGDBException('TPropertyEditorHook.AddHandler');
if FHandlers[HookType]=nil then
FHandlers[HookType]:=TMethodList.Create;
FHandlers[HookType].Add(Handler);
@ -6264,18 +6265,27 @@ end;
procedure TPropertyEditorHook.RemoveHandler(HookType: TPropHookType;
const Handler: TMethod);
begin
FHandlers[HookType].Remove(Handler);
if FHandlers[HookType]<>nil then
FHandlers[HookType].Remove(Handler);
end;
function TPropertyEditorHook.GetHandlerCount(HookType: TPropHookType): integer;
begin
Result:=FHandlers[HookType].Count;
if FHandlers[HookType]<>nil then
Result:=FHandlers[HookType].Count
else
Result:=0;
end;
function TPropertyEditorHook.GetNextHandlerIndex(HookType: TPropHookType;
var i: integer): boolean;
begin
Result:=FHandlers[HookType].NextDownIndex(i);
if FHandlers[HookType]<>nil then
Result:=FHandlers[HookType].NextDownIndex(i)
else begin
i:=-1;
Result:=false;
end;
end;
procedure TPropertyEditorHook.Notification(AComponent: TComponent;