On Wed, Dec 27, 2017 at 6:39 PM, Michael Van Canneyt <[email protected]> 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 Owner. 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. Regards, Juha _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
