Re: Oh... The non-visual components are in my form....as before...

From: damian marquez (dmarquez34_at_hotmail.com)
Date: 11/28/04


Date: Sun, 28 Nov 2004 19:56:16 -0300

Nick Hodges [TeamB] <nickhodges@gmail.com> wrote:
> Jarle Stabell wrote:
>
>> What if you need to create multiple instances of a form, where each
>> instance needs to have its own (separate) set of instances of the
>> non-visual components?
>
> Create a separate instance of the datamodule for each form.

When you told me about it, this was the greatest trick of all really and I
use it a lot.
For me it's the tip#1 for database programming in Delphi and many still
don't know it...
A little coding only is required and you can still use design time stuff
like having a
lookup combo linked to the dataset etc. Very nice.
Thanks Nick.

P.S: I am even thinking that to prove a point, my next db application will
start by
designing the datamodules...

-- 
Have you seen Marillion's Marbles? Visit www.marillion.com and get in
touch with the most amazing music...


Relevant Pages

  • Re: Oh... The non-visual components are in my form....as before...
    ... "damian marquez" wrote in message ... >> Create a separate instance of the datamodule for each form. ... > A little coding only is required and you can still use design time stuff ...
    (borland.public.delphi.non-technical)
  • Re: Equivalent to VCLs DataModule
    ... Unlike VCL's DataModule all of the contained components are declared private in the class, which means that they are not accessible outside of the class. ... I would have preferred it to be called a component container or even a data container since I am guessing I can add non-component value data manually to it also. ... The DataModule is a design-time visual container for non-GUI components, which is never seen visually at run-time as a GUI control. ... For an application at run-time, datamodule instances for each visual datamodule are automatically created just like forms, while for a Dll at run-time it is the programmer's responsibility to create datamodule instances for each visual datamodule created at design time. ...
    (microsoft.public.dotnet.framework)
  • Re: Equivalent to VCLs DataModule
    ... DataModule is a design-time visual container for non-GUI components, ... while for a Dll at run-time it is the programmer's responsibility ... like the ability to manipulate it at design time, ...
    (microsoft.public.dotnet.framework)
  • Re: Equivalent to VCLs DataModule
    ... The DataModule is a design-time visual container for non-GUI components, which is never seen visually at run-time as a GUI control. ... For an application at run-time, datamodule instances for each visual datamodule are automatically created just like forms, while for a Dll at run-time it is the programmer's responsibility to create datamodule instances for each visual datamodule created at design time. ...
    (microsoft.public.dotnet.framework)
  • Re: Equivalent to VCLs DataModule
    ... An application or Dll ... also manually add any non-GUI data to any particular DataModule. ... visual datamodule created at design time. ... non-GUI components in an application or Dll to be very useful. ...
    (microsoft.public.dotnet.framework)

Loading