[Lazarus] TFrame improvements
Ondrej Pokorny
lazarus at kluug.net
Mon Nov 29 22:14:15 CET 2021
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 at lists.lazarus-ide.org <mailto:lazarus at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20211129/9e5f4914/attachment.html>
More information about the lazarus
mailing list