Add an Event on same component for all forms
Posted on 2012-03-18
I have a database Application using Absolute Database. I have around 140 forms, all of them uses the TABSTable.
I want to add three events for TABSTable on all 140 forms, when events occurs, I want to execute same code for all Tables.
Events I want to trigger are :
and the procedures looks like:
procedure TForm.TablePostError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction);
procedure TForm.TableEditError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction);
procedure TForm.TableDeleteError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction);
Three events should execute the same code for all tables in all forms, it is hard to go to every form and add the three events to every Table.
Thanks in Advance!