Hi,
Because of the constant confusion and bug reports the TAction.OnExecute and TControl/TMenuItem.OnClick are now two separate things. See here for details:
Mattias

Mailing lists / lazarus / 2013-05
9 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
Because of the constant confusion and bug reports the TAction.OnExecute and TControl/TMenuItem.OnClick are now two separate things. See here for details:
Mattias
I will test it, it is good for me
But off topic
TMenuItem and TControl both have FOnClick, why not use parent class for both and share that Methods/Function/Properties?
//in fact it is and old discusses and refused before by Lazarus Team =-|*On Mon, May 27, 2013 at 6:58 PM, Mattias Gaertner <
Sharing what methods?
//in fact it is and old discusses and refused before by Lazarus Team =-|*
Mattias
On Mon, May 27, 2013 at 8:16 PM, Mattias Gaertner <
wrote: Sharing what methods?
?Now property OnClick declared both in TControl and TMenuItem for example.?
Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130527/138d01b2/attachment.html>
OnClick is an event, not a method.
Mattias
Because of the constant confusion and bug reports the TAction.OnExecute and…
Hi,
?
Paul today resolved my bugreport 24435 - http://bugs.freepascal.org/view.php?id=24435. It works perfectly except one case: when CheckBox.Action.OnExecute = CheckBox.OnClick. OnClick must be different or nil. Anyway, it shouldn't be problem because as explained on the wiki release notes: Old behavior: .... The OnClicks were not saved to lfm. I only wanted to remind it here - just for the case. ?
Vojt?ch?
______________________________________________________________
Hi,
Because of the constant confusion and bug reports the TAction.OnExecute and TControl/TMenuItem.OnClick are now two separate things. See here for details:
http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#LCL_TAction.OnExecute_no_longer_sets_TControl.2FTMenuItem.OnClick <http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes#LCL_TAction.OnExecute_no_longer_sets_TControl.2FTMenuItem.OnClick>
Mattias
It seems to work on 1.1. Do I miss something?
Mattias
?
If CheckBox.Action.OnExecute = CheckBox.OnClick then change of Checkbox.Checked does not change the Action.Checked but change of Action is propagated to checkbox correctly. If CheckBox.OnClick is different (or nil) then it works perfectly in both directions. ?
Vojt?ch?
______________________________________________________________
It seems to work on 1.1. Do I miss something?
Mattias
? If CheckBox.Action.OnExecute = CheckBox.OnClick then change of Checkbox.Checked does not change the Action.Checked but change of Action is propagated to checkbox correctly.
Please provide an example and create a bug report.
Mattias