Mattias Gärtner wrote: > Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: > > >> On Wed, 9 Jul 2008, Mattias Gärtner wrote: >> >> >>> Zitat von Michael Van Canneyt <[EMAIL PROTECTED]>: >>> >>> >>> the change of the ItemIndex. >>> The LCL sends the second OnChange if OnSelect is nil. I don't know why. >>> Maybe the LCL should be extended to not send the change two times? >>> >> Yes, because this is not consistent with the other widgetsets, and not >> consistent with Delphi ? >> > > I don't know if the OnChange is wrong or the OnSelect<>nil test is wrong. > gtk1 does not send LMSELCHANGE events, so there the case does not happen. > >
The call to OnChange if Select is nil is Delphi compatible. Currently LCL win32 is fully compatible with Delphi regarding this issue. There's a lengthy bug report about this (http://bugs.freepascal.org/view.php?id=1495). See comment 0002113 to the Delphi behavior i described. This bug was fixed some time ago so its a regression. Revising the changes done at that time can lead to the fix (i also provided a patch but Matias used another approach). Luiz _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus