Sign in Join

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

Mailing lists / lazarus / 2013-03

Limit to the number of forms in a project?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

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.

Reply by email

K. P.
to Dave Coventry

Maybe something to do with form auto-creation (Project Oprions -> Forms -> AutoCreate)?Are your forms created at run- or design-time? Cheers,Kai

Show quoted text 27 lines
Date: Wed, 27 Mar 2013 08:12:55 +0200 From: To: 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 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130327/35c0fb60/attachment.html>

Reply by email

Dave Coventry
to K. P.

Hi Kai,

K. P. 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.

Reply by email

Hans-Peter Diettrich
to Dave Coventry
Show quoted text 13 lines
Hi Kai, On 27 March 2013 18:57, K. P. 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

Reply by email