To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Send reply to: [EMAIL PROTECTED]
From: "David Brennan" <[EMAIL PROTECTED]>
Subject: Re: [DUG]: TApplication.MainForm
Date sent: Tue, 5 Sep 2000 10:14:45 +1200
> Hi,
>
> Puzzled by your comments. There shouldn't be any problem sharing a dataset
> between multiple forms. Of course all forms will have to be displaying the
> same record at the same time - it is the same dataset after all. If you want
> a seperate copy for each form then you need to do just that (possibly by
> creating a datamodule instance for each form at run time and linking them in
> code). Similarly there shouldn't be a problem with creating two instances of
> the same form. However you will have to use a different pointer for both
> instances of the form (your mainform variable can't point to both).
>
> I'll grant you that doing these things requires a rather more sophisticated
> application. However they are certainly possible.
Yes they are possible, as we do share a datamodule between
many forms showing different records... but there is jiggery pokery
involved. I was just warning Cheng, in case he belived the
doucmentation about sharing a datamodule. It leads you to believe
that all you have to do is to use local datasources linked to the
same dataset in the datamodule.
>
> David.
> DB Solutions.
>
> ----- Original Message -----
> From: "Rohit Gupta" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Monday, September 04, 2000 8:17 PM
> Subject: Re: [DUG]: TApplication.MainForm
>
>
> > First you do realise that its a Claytons offering.... you can share it
> > between several units, but only one form can use a so-called shared
> dataset
> > at a time.
> >
> > You definitely cant do things like launching two instances of a particluar
> > form.
> >
> > I open the datasets in the Databases's oncreate.
> >
> > Additionally, the code in the dpr file looks like ...
> >
> >
> > Application.CreateForm (mainform)
> > Initalization
> > MainForm.Show
> > Application.CreateForm (Datamodule)
> > more initialization
> > Application.Run
> >
> > -----Original Message-----
> > From: Cheng Wei <[EMAIL PROTECTED]>
> > To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> > Date: Monday, 4 September 2000 15:13
> > Subject: [DUG]: TApplication.MainForm
> >
> >
> > Hi all,
> >
> > Does the main form HAVE TO BE the first form created in the main body of
> the
> > application?
> >
> > The reason of this question is: the main form's OnCreate event handler
> opens
> > datasets created in the Data module (I want these datasets to be shared
> > among several units).
> >
> > Cheers
> > Cheng
> >
> > --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> >
> >
> > --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
>
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
Rohit
======================================================================
CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
PH (649) 489-2280
FX (649) 489-2290
email [EMAIL PROTECTED] or [EMAIL PROTECTED]
======================================================================
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"