[fpc-devel] TCollection.FOwner

Juha Manninen juha.manninen62 at gmail.com
Wed Dec 27 19:27:35 CET 2017

On Wed, Dec 27, 2017 at 6:39 PM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> I don't want to burden TCollection with a field that will rarely be used.
> The proper solution is to implement GetOwner correctly for all cases that
> need it. That's why it is there.
> So if you report all cases where GetOwner is missing/not correctly set, I
> will fix them.

The cases I know were mentioned : TParams, TDefCollection and TFPWebActions.
There already is TOwnedCollection which adds an Owner. TDefCollection
is based on it but then it adds a useless Dataset instead of using the
TParams adds its own FOwner instead of inheriting from TOwnedCollection.
I guess all classes that want to return their owner in GetOwner must
have a variable for it. They could as well inherit from
TOwnedCollection then.

I hope other people will report similar cases for other classes.


More information about the fpc-devel mailing list