Andrew

Is this all so a common property editor can be used?

Regards
Neven

----- Original Message -----
From: Cooke, Andrew <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, 23 November 1999 14:16
Subject: RE: [DUG]: Why?


> Because:
> // Component def
>   published
>      property SQL: TStrings read FSQL write SetQuery;
>
> Now user code doesn't know if SQL is implemented using TStringList, or
> another method (for instance, TListBox uses TListBoxStrings internally,
but
> exposes it consistently as TStrings).
>
> > -----Original Message-----
> > From: Neven MacEwan [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 23, 1999 2:05 PM
> > To: Multiple recipients of list delphi
> > Subject: [DUG]:  Why?
> >
> > Hiya All
> >
> > For no other reason than It intrigues me but does anyone know why the
VCL
> > does this (from TQuery)
> >
> > // Component Def
> >   private
> >     FSQL: TStrings;
> >
> > // consructor
> >
> > constructor TQuery.Create(AOwner: TComponent);
> > begin
> >   inherited Create(AOwner);
> >   FSQL := TStringList.Create;
> >   TStringList(SQL).OnChange := QueryChanged;
> >   ....
> >
> > why declare as TStrings when you want a TStringList?
> >
> > A mystery to me
> >
> > Regards
> > Neven
> >
> >
> >
>
> --------------------------------------------------------------------------
> > -
> >     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to