Re: OnFilterRecord




"UN" <ukko_noa@xxxxxxxxxxxxxxxxxxx> wrote in message
news:d4lr66$e2s$1@xxxxxxxxxxxxxxxxxxxxx
>
> "Sander Martens" <koningsander@xxxxxxx> wrote in message
> news:426e60de$0$95979$dbd4b001@xxxxxxxxxxxxxxxxxx
> > What kind of variable is FilterProc ?
>
> Here a string. Of course OnFilterRecord is a name of a procedure.

OnFilterRecord is of type tFilterRecordEvent, not string. And its not the
name of a procedure, its a method - an important distinction. If you want to
know the setting of OnFilterRecord you should be able to do something like

if Assigned (onFilterRecord)
then begin
if onFilterRecord = someFilterMethod
then begin
. . .
end
else begin
if onFilterRecord = someOtherFilterMethod
then begin
. . .
end;
end
else . . .

Presuming that you have something like the following in your code

procedure tSomeForm.someFilterMethod (DataSet : tDataSet; var Accept :
Boolean);

begin
.. . .
end;

procedure tSomeForm.someOtherFilterMethod (DataSet : tDataSet; var Accept :
Boolean);

begin
.. . .
end;


.