On Fri, 29 Dec 2006 20:56:27 +0000
Sam Liddicott <[EMAIL PROTECTED]> wrote:

> I think Delphi used csLoading in componentState to void triggering
> change events while components were being un-streamed.

The LCL already uses csLoading to avoid calling OnResize.
See TControl.Resize.

Maybe the problem is, that OnCreate is called after Loaded. That means:
A form and its components are loaded with csLoading, then csLoading is
unset and 'Loaded' is called. This can trigger OnResize. When all
'Loaded' were called, OnCreate is triggered.

Also OnResize could be triggered during OnCreate.

I added a check and suspend code, so that OnResize and OnChangeBounds
are now suspended until form creation has ended.


> Sam
> 
> -----Original Message-----
> From: "Micha Nelissen" <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: 29/12/06 19:11
> Subject: Re: [lazarus] "Project raised exception class 'External:
> SIGSEGV'"
> 
> Michael Van Canneyt wrote:
> > Some additional info for the lazarus devels. 
> > 
> > The order of the relevant events in Delphi when creating and
> > showing a form is:
> > 
> >   OnCreate
> >   OnShow
> >   OnActivate
> >   OnResize

I don't see the relationship between OnResize and OnActivate/OnShow.
Why should OnResize be suspended after OnShow?
It seems Delphi does not care about OnResize/OnShow ordering too, it
simply fires OnResize in WMSize and SetBounds.
AFAIK the 'OnResize after OnShow' order is a winapi special, not a
Delphi feature.

 
> Please add to an existing or new bug report.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to