amir wrote:
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 this:
 constructor TChild.Create;
 begin
//     do any thing but not use inherited.
 end;

No way. But you can override the NewInstance method; constructors will call it for sure. You can also override the AfterConstruction method.

--
Joao Morais
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to