On Sat, 01 Oct 2011 18:22:42 +0200 Hans-Peter Diettrich <[email protected]> wrote:
> 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. That is the case since revision 32583. > 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. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
