Page 1 of 1

Overload OnPostError in TMyQuery

Posted: Sat 08 Mar 2008 07:57
by saidus
Hi All ...
I inherite from TMyQuery a Component called TClientMyQuery to encapsulate Client Table Fields in I've Overrided all methode (DoBefore..,DoAfter.. )events with success but I'm wonderring how to Override the OnPostError Event ..
What is the methode that Fire this Event..
or what is the mecanisme to Override it ...
Help me Please ...

Posted: Sat 08 Mar 2008 12:34
by saidus
Thanks // I think i got it
I've created a procedure that intercept the application excption then exchange that handler with this Procedure
like this

Code: Select all

procedure TClientQuery.InterceptException(Sender:TObject;E:Exeption);
begin
  .....
end;
......
procedure TClientQuery.DoBeforePost(Sender:TObject)
begin
   inherited BeforePost;
   Application.OnException := InterceptException;
end;
and it works