On 12.04.2019 19:35, Werner Pamler via lazarus wrote:
I don't know: is this changed or am I fooled by my memory? I was
rather sure that when the signature of a published event is changed,
forms saved with the old signature cannot be read without error. But
now I notice that this is not true any more.
AFAIR it has always been so. Didn't you mix up with virtual methods?
The version of TAChart which I just committed to trunk had to change
the signature of the TChartDataPointDrawEvent event from
procedure (ASender: TDataPointDrawTool) of object;
to
procedure (ASender: TDataPointDrawTool; ADrawer: IChartDrawer) of
object;
You must never change the signature of published events. You pick up a
new name, deprecate the old one and after a stable release you delete
the deprecated one. In this way you still break compatibility, but in a
way that the user is notified about it.
I hope you will have more understanding for breaking changes in the
future after this experience :)
Ondrej
--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus