🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17690

Re: multiple inheritance and the VCL

#17690
From: Alisdair Meredith
Date: Thu, 06 Mar 2003 11:24
24 lines
1903 bytes
Stephan wrote:

> The way around this, for you, is to create a class that inherits the TForm
> and implements your "common" functionality.
> such as:
>     class TCommonForm: public TForm
> 
> Then, when you create a new form, change the inherated
> from "TForm" to "TCommonForm"

Not very helpful if you want to add functionality to a group of
controls.  For instance, we wanted to add our own validation/databinding
to several standard VCL controls.  We do not control the base class, and
our implementation must then rely on knowing each possible derived class
in order to cast and handle each correctly.

Delphi gets around this using interfaces, supporting Multiple Interface
Inheritence for several years.  BCB6 finally gets limitted support for
this with pure abstract base classes, see similar thread in
.language.cpp for details.

-- 
AlisdairM
Team Thai Kingdom
Technical Details
Message-ID: <3E672FE1.C4CC3277@uk.renaultf1.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e64d1be@newsgroups.borland.com> <3e64e3b0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,679d8017f814d3b
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-06 21:27:23 PST
Message-ID: <3E672FE1.C4CC3277@uk.renaultf1.com>
Date: Thu, 06 Mar 2003 11:24:17 +0000
From: Alisdair Meredith <alisdair.meredith@uk.renaultf1.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: multiple inheritance and the VCL
References: <3e64d1be@newsgroups.borland.com> <3e64e3b0$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 195.153.139.2
X-Trace: newsgroups.borland.com 1046949858 195.153.139.2 (6 Mar 2003 03:24:18 -0800)
Lines: 24
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail