Reputation: 1
This sample use 2 forms
1 BaseForm (TFORM)
2 TF1 (BaseForm) inherited
BaseForm has the procedure
Procedure whenDeleteRec(dataset:tdataset) virtual;Abstract
TF1
Procedure whenDeletedRec(dataset:tdataset); override;
Now in the MainForm
when I do baseform (p).WhenDeletedRec(dataset)
where p
is a pointer to tf1
I got a runtime error.
Regards
Med
Upvotes: 0
Views: 31
Reputation: 26376
You give very little information. Based on the information that you give, I'd say It that you cast a pointer to a form to a form
Try dereferencing the pointer first:
baseform(p^).whendeletedrec(dataset);
Upvotes: 0