[Lazarus] Changes to bugreport #33331 completely changes long standing behaviour
Torsten Bonde Christiansen
tc at epidata.info
Wed Apr 4 09:32:59 CEST 2018
On 2018-04-04 09:22, Werner Pamler via Lazarus wrote:
> Am 03.04.2018 um 14:41 schrieb Maxim Ganetsky via Lazarus:
>> I reopened this bug report. Please comment there.
> But since other opinions are required we should discuss here - the bug
> tracker is not the place for discussion. I applied the change leading
> to this issue would like to hear other opinions. Here's what I wrote
> in bug tracker:
> "I don't see anything wrong in the logics of the new behavior: The
> OnChanging event is fired before the selected node is changed. It has
> the node which will become the new selected node as a parameter, and
> you can do some validation and signal in AllowChange whether the
> change to the new node will be allowed or not. In the event handler
> you still have access to the currently selected node as
> TreeView.Selected. Therefore, there is no need at all to duplicate the
> currently selected node in the node parameter of the event.
> This behavior is now compatible with Delphi (it was not before the fix).
> Like any bugfix the new code breaks backward compatibility - sorry for
> the inconvenience if you have relied on the old behavior.
> Which other controls have the OnChanging event? I only found
> TPageControl/TTabControl but they don't pass the changing tab as a
> parameter. "
I can understand the need for being Delphi compatible, but I'm not a fan
of changing a behaviour (which IMHO is not a bug) like this which can
potentially affect a lot of places in user code.
More information about the Lazarus