On 29.11.2021 17:18, Juha Manninen via lazarus wrote:
On Mon, Nov 29, 2021 at 1:32 PM Ondrej Pokorny via lazarus
<lazarus@lists.lazarus-ide.org <mailto:lazarus@lists.lazarus-ide.org>>
wrote:
There are many scenarios when the Canvas cannot be accessed and it
is a
common mistake to access it when not allowed.
I didn't study the issue further but to me it looks strange that
setting
some parameters in CreateParams helps with it. Juha, your commit
description "Somehow fixes issue ..." doesn't help to understand your
change either.
The commit message is not perfect but the committed code is, now that
I fully understand the issue.
That is nonsense. I reverted your change. The code user code is just
plain wrong and your change in TFrame doesn't change anything about it.
Try e.g. :
procedure TForm1.Button1Click(Sender: TObject);
var
grid: TNewGrid;
begin
grid := TNewGrid.Create(Self);
grid.MyProperty := 1; // exception
end;
Btw. Delphi behaves the same.
Ondrej
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus