Re: Adding "Items" property to component

From: Bob Richardson (bobr)
Date: 12/31/04


Date: Fri, 31 Dec 2004 09:15:35 -0800


"Rob Kennedy" <me3@privacy.net> wrote in message
news:33ke04F435rqaU2@individual.net...
> Bob Richardson wrote:
>> After making these changes, I installed the component - then dropped in
>> on a form. When I tried to add some values to "Items" in the Object
>> Inspector, I got "Abstract Error" Have an idea what might be wrong?
>
> Did you also notice a compiler warning about creating an instance of a
> class with abstract methods? I created an instance of TStringList, *not*
> TStrings. TStrings is just the type of the field I used. (That allows you
> to use the Items property with a lot more things; you can assign its value
> from a TMemo.Lines property and vice versa, for instance.)

I thought the tstringLIST was a typo. Now I see it wasn't. The documentation
talks about abstract METHODS - yet TString is an object. So I suppose the
problem is that some of the methods of TString are abstract.

I don't really understand the purpose of defining FItems as a TString
instead of a TStringList.
I think you're saying that - if FItems were defined as a TStringList,
instead of a TString, it would not be possible to assign a TMemo.Lines
property to my Items. Perhaps I would only be able to assign other
TStringlist.Strings. Is that right?