[Lazarus] Declaration of an event type inside a class
Werner Pamler
werner.pamler at freenet.de
Sun Jan 25 22:12:41 CET 2015
The TAChart code contains a strange declaration:
TChart = class(TCustomChart, ICoordTransformer)
public
type
TDrawEvent = procedure (ASender: TChart; ADrawer: IChartDrawer) of
object;
strict private // Property fields
FOnAfterDraw: TDrawEvent;
....
published
property OnAfterDraw: TDrawEvent read FOnAfterDraw write
SetOnAfterDraw;
The declaration of TDrawEvent is part of the TChart declaration! As
reported in the German Lazarus forum
(http://www.lazarusforum.de/viewtopic.php?f=18&t=8474), an error "Unable
to show method..." is generated because of this construction: If I move
the TDrawEvent out of the TChart context everything works fine.
I cannot reach Alexander S Klenin for clarification. But what could have
been his intention of doing it this way? (Or maybe it is just a typo?)
More information about the Lazarus
mailing list