mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 09:17:19 +01:00
IDE: Add DebugLns to indicate how PropertyHook is Nil and causes the error. Issue #22322
git-svn-id: trunk@37806 -
This commit is contained in:
parent
ddad43e884
commit
ab93fd6669
@ -1656,9 +1656,10 @@ begin
|
||||
for a:=0 to FRows.Count-1 do Rows[a].Free;
|
||||
FRows.Clear;
|
||||
// get properties
|
||||
GetPersistentProperties(
|
||||
FSelection, FFilter + [tkClass], FPropertyEditorHook, @AddPropertyEditor,
|
||||
@EditorFilter);
|
||||
if FPropertyEditorHook=Nil then
|
||||
debugln('TOICustomPropertyGrid.BuildPropertyList: FPropertyEditorHook=Nil');
|
||||
GetPersistentProperties(FSelection, FFilter + [tkClass], FPropertyEditorHook,
|
||||
@AddPropertyEditor, @EditorFilter);
|
||||
// sort
|
||||
FRows.Sort(@SortGridRows);
|
||||
for a:=0 to FRows.Count-1 do begin
|
||||
|
||||
@ -2202,12 +2202,13 @@ end;
|
||||
|
||||
{ TPropertyEditor }
|
||||
|
||||
constructor TPropertyEditor.Create(Hook: TPropertyEditorHook;
|
||||
APropCount:Integer);
|
||||
constructor TPropertyEditor.Create(Hook: TPropertyEditorHook; APropCount:Integer);
|
||||
var
|
||||
PropListSize: Integer;
|
||||
begin
|
||||
FPropertyHook:=Hook;
|
||||
if not Assigned(FPropertyHook) then
|
||||
debugln('TPropertyEditor.Create : Hook=Nil <- Wrong!');
|
||||
PropListSize:=APropCount * SizeOf(TInstProp);
|
||||
GetMem(FPropList,PropListSize);
|
||||
FillChar(FPropList^,PropListSize,0);
|
||||
@ -3950,8 +3951,10 @@ end;
|
||||
|
||||
function TMethodPropertyEditor.GetValue: ansistring;
|
||||
begin
|
||||
Result:=PropertyHook.GetMethodName(GetMethodValue,GetComponent(0));
|
||||
//debugln(['TMethodPropertyEditor.GetValue Name=',GetName,' Result=',Result,' Data=',dbgs(GetMethodValue.Data)]);
|
||||
if Assigned(PropertyHook) then
|
||||
Result:=PropertyHook.GetMethodName(GetMethodValue,GetComponent(0))
|
||||
else
|
||||
debugln(['TMethodPropertyEditor.GetValue : PropertyHook=Nil Name=',GetName,' Data=',dbgs(GetMethodValue.Data)]);
|
||||
end;
|
||||
|
||||
procedure TMethodPropertyEditor.GetValues(Proc: TGetStrProc);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user