[Lazarus] Limit to the number of forms in a project?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Limit to the number of forms in a project?

Dave Coventry
I needed a dialog box to allow users to select which database to
access in my project.

The project already has 6 forms.

But when I added a form and click 'Run', the Project appears to
compile but doesn't run in the debugger. If I run the compiled project
from the command line, it runs but the 7th Form does not appear.

Odd.

Lazarus 1.1 r40644 FPC 2.6.0 x86_64-linux-gtk 2,

The same behaviour is observed in Lazarus running on an XP guest
running on a Virtualbox VM Lazarus 1.0.7 r40363 FPC 2.6.0
i386-win32-win32/win64.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Limit to the number of forms in a project?

K. P.
Maybe something to do with form auto-creation (Project Oprions -> Forms -> AutoCreate)?
Are your forms created at run- or design-time?
 
Cheers,
Kai
 
> Date: Wed, 27 Mar 2013 08:12:55 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: [Lazarus] Limit to the number of forms in a project?
>
> I needed a dialog box to allow users to select which database to
> access in my project.
>
> The project already has 6 forms.
>
> But when I added a form and click 'Run', the Project appears to
> compile but doesn't run in the debugger. If I run the compiled project
> from the command line, it runs but the 7th Form does not appear.
>
> Odd.
>
> Lazarus 1.1 r40644 FPC 2.6.0 x86_64-linux-gtk 2,
>
> The same behaviour is observed in Lazarus running on an XP guest
> running on a Virtualbox VM Lazarus 1.0.7 r40363 FPC 2.6.0
> i386-win32-win32/win64.
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Limit to the number of forms in a project?

Dave Coventry
Hi Kai,

On 27 March 2013 18:57, K. P. <[hidden email]> wrote:
> Maybe something to do with form auto-creation (Project Oprions -> Forms ->
> AutoCreate)?

Yes, I'd assume that, too.

> Are your forms created at run- or design-time?

They are created at design time.

I suppose that I should actually be creating them at run time.

According to the last post by Juha in this thread:
http://www.lazarus.freepascal.org/index.php/topic,20139.msg115782.html#msg115782

creating the form at run time is preferable, anyway.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Limit to the number of forms in a project?

Hans-Peter Diettrich
Dave Coventry schrieb:

> Hi Kai,
>
> On 27 March 2013 18:57, K. P. <[hidden email]> wrote:
>> Maybe something to do with form auto-creation (Project Oprions -> Forms ->
>> AutoCreate)?
>
> Yes, I'd assume that, too.
>
>> Are your forms created at run- or design-time?
>
> They are created at design time.
>
> I suppose that I should actually be creating them at run time.

I think that the right question is about automatic form creation (on app
start) or on demand. I'd let the first form be auto-created, and in its
FormCreate handler it creates the other form, before using it or its
components.

The shared components (list...) also better are moved into a common
unit, where they can be created during program initialization. This
initialization can reside either in the unit initialization section, or
in a routine called from a splash screen, or in the main form creation
handler.

DoDi


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus