[Pas2js] Picture serialisation into Pascal

Michael Van Canneyt michael at freepascal.org
Mon Dec 10 11:10:40 CET 2018



On Mon, 10 Dec 2018, Mattias Gaertner via Pas2js wrote:

> On Mon, 10 Dec 2018 10:31:47 +0100 (CET)
> Michael Van Canneyt <michael at freepascal.org> wrote:
>
>> [...]
>> > Delphi components cannot. 
>> 
>> ? In my experience, most can. 
>> I often set a bunch of properties, and then set the parent.
>
> It was a long time ago. Some properties had problems with the Handle.
> Maybe nowadays they work better.

Indeed, for complex controls (ListView, Treeview), setting some properties needs a handle, 
and the handle more often than not needs a parent.

So setting the parent first may not be a bad idea.

I think the streamer in FPC also does this, as there is a separate SetParent
call, I would need to verify that.

Michael.


More information about the Pas2js mailing list