[fpc-pascal] How to make class constructor body calls descendant's overriden method/property?

2012-11-17 Thread leledumbo
Cross posted from stackoverflow: http://stackoverflow.com/questions/13431079/how-to-make-class-constructor-body-calls-descendants-overriden-method-property I'm writing an ORM framework and got stuck in a way to automatically determine table name from class name. In my base object for the ORM to

Re: [fpc-pascal] How to make class constructor body calls descendant's overriden method/property?

2012-11-17 Thread JC Chu
A CLASS CONSTRUCTOR is a special CLASS STATIC method executed during unit initialization. Because it is CLASS STATIC, Self is undefined (and thus (1) what you write for ClassName in TghModel.Create really stands for TghModel.ClassName, and (2) if TUsers inherits it, the same code will be

Re: [fpc-pascal] How to make class constructor body calls descendant's overriden method/property?

2012-11-17 Thread Joao Morais
On Sat, Nov 17, 2012 at 12:48 PM, leledumbo leledumbo_c...@yahoo.co.id wrote: Cross posted from stackoverflow: http://stackoverflow.com/questions/13431079/how-to-make-class-constructor-body-calls-descendants-overriden-method-property I'm writing an ORM framework and got stuck in a way to