Mattias Gaertner schrieb:
Even if the 2 callbacks are pointing to the same method, calling
Action.OnExecute, will call the callback with Sender=TheAction, while
FOnClick gets the current object.
Looks as if Execute should be overridden in TControlActionLink!
Why? How?
To use the control as Sender, at least when it equals the control's OnClick.
At least everything would be more clear, when in the case of different
control.OnClick and action.Execute the OnClick would take precedence.
Then it can be assumed that the OnClick handler expects a control, while
equal handlers more probably indicate and Execute handler, expecting an
Action as Sender. Then Execute doesn't deserve an override.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus