[fpc-devel] How to force the child's constructor to call its parent constructor
post at joaomorais.com.br
Sun Oct 21 21:50:20 CEST 2007
> I want to force the all childs of TParent to call the Create constructor
> (with appropriate parameter). But one can implement a child class like
> constructor TChild.Create;
> // do any thing but not use inherited.
No way. But you can override the NewInstance method; constructors will
call it for sure. You can also override the AfterConstruction method.
More information about the fpc-devel