Re: [lazarus] exception when using [].ShowModal

2005-09-09 Thread Bartek
Mattias Gaertner wrote: On Thu, 08 Sep 2005 11:08:54 +0200 Bartek [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Sun, 07 Aug 2005 18:40:05 +0200 Bartek [EMAIL PROTECTED] wrote: [...] TCustomForm.ShowModal Visible=False Enabled=True fsModal=True You are showing the form twice.

Re: [lazarus] exception when using [].ShowModal

2005-09-09 Thread Marc Weustink
Bartek wrote: Mattias Gaertner wrote: On Thu, 08 Sep 2005 11:08:54 +0200 Bartek [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Sun, 07 Aug 2005 18:40:05 +0200 Bartek [EMAIL PROTECTED] wrote: [...] TCustomForm.ShowModal Visible=False Enabled=True fsModal=True You are showing

Re: [lazarus] exception when using [].ShowModal

2005-09-09 Thread Mattias Gaertner
On Fri, 09 Sep 2005 14:19:14 +0200 Bartek [EMAIL PROTECTED] wrote: [...] TCustomForm.ShowModal is the only method, that sets fsModal. You got the exception, because the fsModal was already set, so ShowModal was called twice. You are showing the form in a timer. Maybe the you forgot to

Re: [lazarus] exception when using [].ShowModal

2005-09-09 Thread Bartek
OnTimer runs in the same thread. ShowModal creates a new event loop, that means all events are still triggered, and thus all timers still work. The main loop in TApplication is stopped and thus the application does not terminate before the modal form stops. Mattias -- Showmodal doesn't mean

Re: [lazarus] exception when using [].ShowModal

2005-09-08 Thread Bartek
Mattias Gaertner wrote: On Sun, 07 Aug 2005 18:40:05 +0200 Bartek [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: what I'm doing wrong? Try setting the visible property of the form to false. done so: |

Re: [lazarus] exception when using [].ShowModal

2005-09-08 Thread dhkblaszyk
I close some of the unneeded forms manually. Why do you do that? Just tell lazarus to not create the forms. Project | Project Options | Forms Move the forms you don't want to create to Available. I'm not shure, but perhaps you destroy a form that is not created yet. Try it and report back ;-)

Re: [lazarus] exception when using [].ShowModal

2005-09-08 Thread Darius Blaszijk
On Thu, 2005-09-08 at 12:45, Bartek wrote: I do not see the difference in creating the forms by myself than letting Lazarus create them. :/ What does your lpr file show in that case?? Darius _ To unsubscribe: mail [EMAIL

Re: [lazarus] exception when using [].ShowModal

2005-09-08 Thread Mattias Gaertner
On Thu, 08 Sep 2005 11:08:54 +0200 Bartek [EMAIL PROTECTED] wrote: Mattias Gaertner wrote: On Sun, 07 Aug 2005 18:40:05 +0200 Bartek [EMAIL PROTECTED] wrote: [...] TCustomForm.ShowModal Visible=False Enabled=True fsModal=True You are showing the form twice. Skip the second. Mattias

Re: [lazarus] exception when using [].ShowModal

2005-09-08 Thread Mattias Gaertner
On Thu, 08 Sep 2005 19:37:35 +0200 Bartek [EMAIL PROTECTED] wrote: [...] Is there a difference between Application.Create(TForm,Form); and From:=TFrom.Create(main_form); ? Yes. 1. Application.CreateForm uses itself as owner instead of main_form. 2. It sets the variable 'Form' and then calls

Re: [lazarus] exception when using [].ShowModal

2005-09-07 Thread dhkblaszyk
what I'm doing wrong? Try setting the visible property of the form to false. Darius _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at

Re: [lazarus] exception when using [].ShowModal

2005-09-07 Thread Mattias Gaertner
On Sun, 07 Aug 2005 18:40:05 +0200 Bartek [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: what I'm doing wrong? Try setting the visible property of the form to false. done so: | TCustomForm.ShowModal Visible=False