Can't you use a type helper to access the fields only locally in other classes? Unfortunately this works only for `protected` and not for `private` fields, but if it's your own class, maybe you'd like to give it a try.
Btw: I would be great if type helpers could be given access to `private` fields, too! ----- Original Message ----- From: Hairy Pixels via fpc-pascal <[email protected]> To: FPC-Pascal users discussions <[email protected]> Sent: Saturday, November 29, 2025, 14:31:33 Subject: [fpc-pascal] How to have smaller units On Nov 29, 2025 at 6:43:44 PM, Guillermo Martínez Jiménez via fpc-pascal < [email protected]> wrote: > I have no idea about what are you doing but I'm pretty sure you can fix > this by using a different design; maybe to revise some patterns will > help you to find the way to do it more properly. He has a fair point. Imagine you have two classes and they want to write to their fields but this only happens internally in your library while the users of the library should never do this. How do you solve it? You basically want a write property but just internally in your library. _______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
