Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-05

Question

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Piotr Wróblewski

I have some doubts in Lazarus for Win32 application.inc. Every time creating form with TApplication.CreateForm it is added to FFormList. I can't find any place in code where Free or Delete for single form is done. Also this construction in DoIdleActions is dengerous:

  if FFormListnil then begin
    for i:=0 to FFormList.Count-1 do begin
      AForm:=TForm(FFormList[i]);
*      if AForm.FormStyle=fsSplash then*
        AForm.Hide;

I have program error on bold line several times. Has anyone such problems?

Reply by email

Mattias Gärtner
to Piotr Wróblewski

Zitat von Piotr Wr?blewski :

I have some doubts in Lazarus for Win32 application.inc. Every time creating form with TApplication.CreateForm it is added to FFormList. I can't find any place in code where Free or Delete for single form is done.

CreateForm creates forms with Application as Owner. So the forms are freed, when Application is freed, which is done in finalization of unit forms.

Show quoted text 9 lines
Also this construction in DoIdleActions is dengerous: if FFormListnil then begin for i:=0 to FFormList.Count-1 do begin AForm:=TForm(FFormList[i]); * if AForm.FormStyle=fsSplash then* AForm.Hide; I have program error on bold line several times. Has anyone such problems?

No problems here. What are you doing with your splash forms?

Mattias

Powered by NetMail

Reply by email

Piotr Wróblewski
to Mattias Gärtner

I don't have any splash forms but debugger stops here. Probably because of nil AForm.

Mattias G?rtner pisze:

Show quoted text 35 lines
Zitat von Piotr Wr?blewski : > I have some doubts in Lazarus for Win32 application.inc. Every time > creating form with TApplication.CreateForm it is added to FFormList. > I can't find any place in code where Free or Delete for single form > is done. CreateForm creates forms with Application as Owner. So the forms are freed, when Application is freed, which is done in finalization of unit forms. > Also this construction in DoIdleActions is dengerous: > > if FFormListnil then begin > for i:=0 to FFormList.Count-1 do begin > AForm:=TForm(FFormList[i]); > * if AForm.FormStyle=fsSplash then* > AForm.Hide; > > I have program error on bold line several times. Has anyone such > problems? No problems here. What are you doing with your splash forms? Mattias -- Powered by NetMail _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email