Indy: Using Event w/ Dynamically Created Control
Posted on 2002-05-24
In my application I'm dynamically creating the TIdHTTP component and I would like to use the OnWork and OnWorkBegin events. How do I do this when the component is created dynamically? I've tried adding:
procedure httpWorkBegin(Sender: TObject; AWorkMode: TWorkMode; const
to the procedure that creates and uses the http component but when I try to assign it to the http component using: http.OnWorkBegin := httpWorkBegin; it gives me the error "Incompatible types: method pointer and regular procedure".
Anyone know what's wrong or how I should be doing this?