Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.pascal.delphi.misc > #148

Re: How to call class method by reference?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups alt.comp.lang.borland-delphi, comp.lang.pascal.delphi.misc, alt.lang.delphi
Subject Re: How to call class method by reference?
Date Wed, 28 Dec 2011 15:47:28 +0100
Lines 14
Message-ID <9m0q4fFoaoU1@mid.individual.net> (permalink)
References <4efa3528$0$1191$65785112@news.neostrada.pl> <9lvpipFdjfU1@mid.individual.net> <4efafce1$0$1225$65785112@news.neostrada.pl>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net slKps7AgBAKejDVEDeXwDg4w+UA8MR12dpiir+B8Gf5ek+fyc6
Cancel-Lock sha1:Xx+tYTiq8Jb2k4iasIaxPGweDhM=
User-Agent Thunderbird 2.0.0.21 (Windows/20090302)
In-Reply-To <4efafce1$0$1225$65785112@news.neostrada.pl>
Xref x330-a1.tempe.blueboxinc.net comp.lang.pascal.delphi.misc:148

Cross-posted to 3 groups.

Show key headers only | View raw


aaaa schrieb:
>> Then use interfaces.
>>
>> type TDog = class(TInterfacedObject, IAnimal)
> 
> But my TDog is already based on a class and I don't want to change this.

Then add the interface support to that class (_AddRef etc.). You can use 
the code in TInterfacedObject as a template.

Hint: your rating will be reduced to "a", if you don't know about using 
interfaces in Delphi ;-)

DoDi

Back to comp.lang.pascal.delphi.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-27 22:14 +0100
  Re: How to call class method by reference? Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2011-12-27 21:50 -0500
    Re: How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-28 12:42 +0100
  Re: How to call class method by reference? Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2011-12-27 21:56 -0500
    Re: How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-28 12:41 +0100
  Re: How to call class method by reference? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2011-12-28 06:33 +0100
    Re: How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-28 12:26 +0100
      Re: How to call class method by reference? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2011-12-28 13:33 +0100
      Re: How to call class method by reference? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2011-12-28 15:47 +0100
        Re: How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-28 18:31 +0100
  Re: How to call class method by reference? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2011-12-28 13:29 +0100
    Re: How to call class method by reference? "aaaa" <aaaa@aaaaaaaaaaaaaaaaaaa.com> - 2011-12-28 14:31 +0100
  Re: How to call class method by reference? "Skybuck Flying" <Windows7IsOK@DreamPC2006.com> - 2011-12-29 09:02 +0100

csiph-web