Event handlers...
- From: "swansnow" <schultz@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: 26 Jan 2006 14:02:35 -0800
OK. I just know I'm doing something wrong, because assigning an event
handler is easy...
There's no classes involved, except for prn (the object generating
events)
Here's the procedure for handling the event:
cancelQry is a TDataset which is being acted upon elsewhere. It is a
global. (Since I can't pass in parameters, and I want this handler to
be used wherever I have a printing progress indicator. I know, it's a
hack :) )
procedure PrnCancel(Sender: TObject);
begin
if assigned(cancelQry) then
cancelQry.last;
end;
Here's how I'm assigning the event handler:
cancelQry := myQry;
prn.OnCancel := prnCancel;
Here's the error message I'm getting from the compiler:
incompatible types: 'method pointer and regular procedure'
Initially, I had the handler in a different unit, and then I tried
putting it in the same unit, but still got the error message.
What am I doing wrong??
-Corinna
.
- Follow-Ups:
- Re: Event handlers...
- From: Rob Kennedy
- Re: Event handlers...
- Prev by Date: DBGrid1.OnDrawColumnCell goes into infinite loop
- Next by Date: Re: fix for blinking data-aware controls?
- Previous by thread: DBGrid1.OnDrawColumnCell goes into infinite loop
- Next by thread: Re: Event handlers...
- Index(es):
Relevant Pages
|