It's been a long while since I've written a Delphi component.
As I'm writing yet another Delphi component, this time, on MacOS, I find myself having to grapple with how component persistence works in Delphi.
When the Delphi RTL is loading or storing an instance of a component on a form, it reads the path of each property.
If the property does not have any property information (no PropInfo: this happens when the property is not published or has no RTTI), the RTL then calls Instance.DefineProperties (where Instance is an instance of the component currently being created). If the property has property information (is published or has RTTI), it is automatically persisted. So if there is a call to Filer.DefineProperty with an existing published property, then the property will be persisted twice.
In the component where the DefineProperties method is overridden, typically something like the following is seen:
inherited DefineProperties(Filer); Filer.DefineProperty('SourcePoint', ReadSourcePoint, WriteSourcePoint, FShape = stComicCallout);
In 2017, with the release of Delphi 10.2 Tokyo, Embarcadero introduced a specialized implementation of the Observer pattern into the System.Classes unit. While it has been in the wild for 9 years, it remains a "hidden" architecture for many, primarily because it serves as the invisible engine behind LiveBindings. Other than live bindings, you can also use the Observer pattern as a way to update component settings to the Windows registry, an .ini file, or persist it elsewhere.
System.Classes