I have a problem with a custom component I 've made consisting of a TButton and a TDBEdit. I have some code which does some validation and I want it to apply to all instances of my control. I do this on the BeforePostEvent of the control's dataset with the following code in the constructor of my component:
constructor customcomponent.Create(AOwner: TComponent);
Self.DataSource.DataSet.BeforePost := DBEditBeforePost;
procedure customcomponent.DBEditBeforePost(DataSet: TDataSet);
Then I go on a form with the customcomponent on it and a TTable with name "aTable":
procedure TfrmPurchaseOrder.aTableBeforePost(DataSet: TDataSet);
My problem with this is that when I assign some code in the BeforePost event of the form containing my component although "inherited" is there the form's code is not executed (Code Y in the example) but only the component's (Code X in the example). Is there anything I can do to execute 'Code X' via the inherited and 'Code Y' next???