Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-05

LCL change: TAction.OnExecute no longer sets TControl/TMenuItem.OnClick

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Zaher Dirkey
to Mattias Gaertner

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 <

Show quoted text 19 lines
wrote: 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 Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130527/c76c33e9/attachment.html>

Reply by email

Mattias Gaertner
to Zaher Dirkey
Show quoted text 5 lines
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?

Sharing what methods?

//in fact it is and old discusses and refused before by Lazarus Team =-|*

Mattias

Reply by email

Mattias Gaertner
to Zaher Dirkey
Show quoted text 7 lines
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.?

OnClick is an event, not a method.

Mattias

Reply by email

Vojtěch Čihák
to Mattias Gaertner: 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?
______________________________________________________________

Show quoted text 5 lines
Od: "Mattias Gaertner" Komu: Datum: 27.05.2013 17:58 P?edm?t: [Lazarus] LCL change: TAction.OnExecute no longer sets TControl/TMenuItem.OnClick

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

Reply by email

Mattias Gaertner
to Vojtěch Čihák
Show quoted text 5 lines
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.

It seems to work on 1.1. Do I miss something?

Mattias

Reply by email

Vojtěch Čihák
to Mattias Gaertner

?
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?
______________________________________________________________

Show quoted text 5 lines
Od: "Mattias Gaertner" Komu: Datum: 10.06.2013 23:20 P?edm?t: Re: [Lazarus] LCL change: TAction.OnExecute no longer sets TControl/TMenuItem.OnClick
Show quoted text 5 lines
Hi, ? Paul today resolved my bugreport 24435 - http://bugs.freepascal.org/view.php?id=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.

It seems to work on 1.1. Do I miss something?

Mattias

Reply by email

Mattias Gaertner
to Vojtěch Čihák
? 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

Reply by email