[Lazarus] Incompatible types for OnChange?
nc-gaertnma at netcologne.de
Tue Jul 22 00:04:10 CEST 2008
On Mon, 21 Jul 2008 22:52:02 +0200
Marc Weustink <marc at dommelstein.net> wrote:
> Martin Friebe wrote:
> > I noticed something, which I can't explain. Here is the question
> > in ide/editoroptions is procedure:
> > procedure GeneralCheckBoxOnChange(Sender: TObject; Index:
> > integer);
> > This is assigned (via the Resources of the form) to the TCheckBoxes
> > on the editor-option's color page. ("TextBoldCheckBox").
> > I understand that it compiles, since the compiler does include
> > resource as they are. BUT it also executes? So on change calls a
> > method with a signature different from what it should expect?
> > How does that work?
> My guess: The params are passed in a register, so no stack cleanup
> needed and thus no corruption.
Yes, this trick works for years and was used by the IDE for designer
events till 0.9.24.
The GeneralCheckBoxOnChange was probably introduced when the editor
options were converted to lfm.
Fixed. This also fixed the gutter/smart tabs bug.
More information about the Lazarus