Re: OnFilterRecord
- From: "UN" <ukko_noa@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 09:51:10 +0300
"Bruce Roberts" <ber@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:5%Mbe.3825>
var m : tFilterRecordEvent;
m := FindName; if @OnFilterRecord = @m . . .
Thank you, the debugger accepts the following code, but I think it is a bit clumsy ...
In this procedure some addresses are searched (OnFilterRecord:=FindAddress;). When entering it there may be a filter on, either FindName or FindNames. At the end this original filter have to be set on and its name is saved in a variable sFilter.
..
var sFilter :string;
ok :boolean;
bok :TBookmarkStr;
FilterMeth :TFilterRecordEvent;
begin
With aTable do begin
sFilter:='';
try
If filtered then begin
if Assigned(OnFilterRecord) then begin
FilterMeth:=FindName;
if @OnFilterRecord = @FilterMeth then sFilter:='FindName' else begin
FilterMeth:=FindNames;
if @OnFilterRecord = @FilterMeth then sFilter:='FindNames';
end;
end;
end;
bok:=Bookmark;
OnFilterRecord:=FindAddress;
filtered:=true;
FindAddress(aTable,ok);
finally
filtered:=false;
If sFilter<>'' then begin
if sFilter='FindName' then OnFilterRecord:=FindName
else if sFilter='FindNames' then OnFilterRecord:=FindNames;
filtered:=true;
end;
Bookmark:=bok;
end;
end;
end;
.
- Follow-Ups:
- Re: OnFilterRecord
- From: Rob Kennedy
- Re: OnFilterRecord
- References:
- OnFilterRecord
- From: UN
- Re: OnFilterRecord
- From: Sander Martens
- Re: OnFilterRecord
- From: UN
- Re: OnFilterRecord
- From: Sander Martens
- Re: OnFilterRecord
- From: UN
- Re: OnFilterRecord
- From: Bruce Roberts
- Re: OnFilterRecord
- From: UN
- Re: OnFilterRecord
- From: Bruce Roberts
- OnFilterRecord
- Prev by Date: Virtual Library Interfaces (VLI).
- Next by Date: Re: GetProcAddress in Delphi .net 2005
- Previous by thread: Re: OnFilterRecord
- Next by thread: Re: OnFilterRecord
- Index(es):
Relevant Pages
|