Marco van de Voort wrote:
> On Tue, Mar 20, 2007 at 01:58:56PM +0300, Al Boldi wrote:
> > Antonio Sanguigni wrote:
> > > And, broadly speaking, it is not a good practice modifying an ancestor
> > > to suite these needs.
> >
> > Yes, as this would probably require a recompile of the ancestor.
> >
> > But, why is it not possible to override the ancestor?
>
> The size of fields of TObject is used in planning the layout of
> descendants of TObject. Overriding only makes use of room already there
> (reserved in the VMT by the virtual directive), it doesn't create room.
>
> This is also why you can't override non virtual methods.

Thanks for this very clear and to the point answer.

Would it be possible to implement virtual objects?


Thanks!

--
Al

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to