Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread TObjectList Create override
Tue, Apr 5 2016 5:16 AMPermanent Link

Matthew Jones

I want to create a descendant of TObjectList. I can override the normal
Create, but not the one with the parameter because it is not marked as
virtual in TObjectList. If I don't mark it as override, the compiler
complains. What am I missing?

Do I have to hack the TObjectList source to make its
  constructor Create(AOwnsObjects: Boolean);
into
  constructor Create(AOwnsObjects: Boolean); virtual;

Or how am I supposed to do this? I tried reintroduce but not known.

--

Matthew Jones
Tue, Apr 5 2016 5:18 AMPermanent Link

Matthew Jones

Matthew Jones wrote:

> I want to create a descendant of TObjectList.

Hmm, perhaps scratch this anyway, other than general interest. Because
the OwnsObjects is private, I can't do what I want this way. I will
have to write my class as a container instead of derived.


--

Matthew Jones
Image