MG: get compatible published methods now works

git-svn-id: trunk@1392 -
This commit is contained in:
lazarus 2002-02-09 02:30:16 +00:00
parent 46ae7f0d85
commit 100ab29f02
3 changed files with 9 additions and 6 deletions

View File

@ -178,8 +178,8 @@ type
var NewX, NewY, NewTopLine: integer): boolean;
// functions for events in the object inspector
procedure GetCompatibleMethods(Code: TCodeBuffer; const AClassName: string;
TypeData: PTypeData; Proc: TGetStringProc);
function GetCompatibleMethods(Code: TCodeBuffer; const AClassName: string;
TypeData: PTypeData; Proc: TGetStringProc): boolean;
function MethodExists(Code:TCodeBuffer; const AClassName,
AMethodName: string; TypeData: PTypeData): boolean;
function JumpToMethodBody(Code: TCodeBuffer;
@ -712,18 +712,19 @@ writeln('TCodeToolManager.GuessUnclosedBlock END ');
{$ENDIF}
end;
procedure TCodeToolManager.GetCompatibleMethods(Code: TCodeBuffer;
const AClassName: string; TypeData: PTypeData; Proc: TGetStringProc);
function TCodeToolManager.GetCompatibleMethods(Code: TCodeBuffer;
const AClassName: string; TypeData: PTypeData; Proc: TGetStringProc): boolean;
begin
{$IFDEF CTDEBUG}
writeln('TCodeToolManager.GetCompatibleMethods A ',Code.Filename,' Classname=',AClassname);
{$ENDIF}
Result:=InitCurCodeTool(Code);
if not InitCurCodeTool(Code) then exit;
try
FCurCodeTool.GetCompatiblePublishedMethods(UpperCaseStr(AClassName),
Result:=FCurCodeTool.GetCompatiblePublishedMethods(UpperCaseStr(AClassName),
TypeData,Proc);
except
on e: Exception do HandleException(e);
on e: Exception do Result:=HandleException(e);
end;
end;

View File

@ -834,6 +834,7 @@ begin
WordIsPredefinedIdentifier:=TKeyWordFunctionList.Create;
KeyWordLists.Add(WordIsPredefinedIdentifier);
with WordIsPredefinedIdentifier do begin
Add('POINTER' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('INT64' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('CARDINAL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
Add('QWORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);

View File

@ -2052,6 +2052,7 @@ end;
procedure TMethodPropertyEditor.GetValues(Proc: TGetStringProc);
begin
writeln('### TMethodPropertyEditor.GetValues');
PropertyHook.GetMethods(GetTypeData(GetPropType), Proc);
end;