fixed methodjumping example

git-svn-id: trunk@8831 -
This commit is contained in:
mattias 2006-02-26 12:28:26 +00:00
parent ce99ba98b8
commit 7727771aa3
2 changed files with 5 additions and 3 deletions

View File

@ -6,12 +6,12 @@
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
</General>
<LazDoc Paths=""/>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>

View File

@ -37,10 +37,12 @@ var
NewX, NewY, NewTopLine: integer;
RevertableJump: boolean;
begin
ExpandedFilename:=ExpandFileName('tgeneric2.pp');
ExpandedFilename:=ExpandFileName('scanexamples/tgeneric2.pas');
CodeBuf:=CodeToolBoss.LoadFile(ExpandedFilename,true,false);
if CodeBuf=nil then
raise Exception.Create('failed loading '+ExpandedFilename);
if CodeToolBoss.JumpToMethod(CodeBuf,3,15,NewCode,NewX,NewY,NewTopLine,
RevertableJump)
RevertableJump)
then
writeln(NewCode.Filename,' ',NewX,',',NewY,' TopLine=',NewTopLine,
' RevertableJump=',RevertableJump)