[fpc-pascal] TStringList.Put calls change even if value hasn't changed
Michael Van Canneyt
michael at freepascal.org
Mon Feb 11 12:30:50 CET 2013
On Mon, 11 Feb 2013, Bart wrote:
> On 2/10/13, Michael Van Canneyt <michael at freepascal.org> wrote:
>
>> You expect wrong. No supposition is made whatsoever on the value.
>> Every write in the list triggers a change.
>>
>> This is how delphi implements it, and that is how we implemented it.
>
> That's why I mentioned I might be horribly wrong.
> So Delphi compatibility.
Yes.
>
> I think it's inconsitent with other components that have a OnChange.
> Generally this is only fired if something (text) "really" changed.
There are many exceptions to that rule.
> Current behaviour leads to many unneccesary calls to OnChange and
> OnChanging in a certain Lazarus LCL component (fixed it there).
I am aware of this.
But the impact of changing it is impossible to guess, so it is not
subject to change.
Michael.
More information about the fpc-pascal
mailing list