Stephen
Thats a problem!, implement another Int that exposes them?
Neven
----- Original Message -----
From: Stephen Bertram <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 15 February 2001 17:25
Subject: RE: [DUG]: Mucking with Controls.pas
> Yes - I'm already using an interface to propagate changes to all controls
at
> design time. As yet I haven't figured out how to effectively to implement
> methods by delegation where those methods refer to private fields.
>
> Any examples would be a help.
>
> Cheers
>
> Stephen
>
>
> -----Original Message-----
> From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 15 February 2001 5:11 p.m.
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: Mucking with Controls.pas
>
>
> Stephen
>
> Rather than inserting an ancestor, why not define an interface
> (this enforces implementation) and if there is a great level of
> commonality you can implement it (the interface) by delegation in
> your own 'subjobject' which is passed it's owner (as the base class)
> at construction, easy to implement, easy to use
>
> HTH Neven
>
> ie.
>
> type
> TSubObject = class(Object, ImyInterface)
> private
> FWincontrol: TWinControl;
> public
> constructor Create(AWinControl: TWinControl); overload;
> end;
>
> TmyControl = class(TWinControl, ImyInterface)
> private
> FSubObject: TSubObject;
> property
> SubObject: TSubObject read FSubObject write FSubObject implements
> ImyInterface
> end
>
>
>
>
>
>
>
> ----- Original Message -----
> From: Stephen Bertram <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Sent: Thursday, 15 February 2001 12:11
> Subject: [DUG]: Mucking with Controls.pas
>
>
> > I have a need to add a couple of properties and an interface to all my
> > controls. ATM I'm creating descendants and adding then to each class,
but
> > it would be much neater to insert a new ancestor containing the
properties
> > between TWinControl and TGraphicControl and TControl.
> >
> > On a first attempt I ran into so much co-linkage through the standard
> > classes that I gave up the idea. However I would be interested to hear
of
> > anyone who has done something similar or has some pointers on ways,
means
> > and traps.
> >
> > TIA
> >
> > Stephen
> >
> >
>
> --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> >
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"