Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OpenModalForm parameters
Message
De
16/10/2002 14:13:54
 
 
À
16/10/2002 03:32:22
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00711542
Message ID:
00711879
Vues:
11
Gary:
Thanks for your response.
I'm trying to instantiate a frmModalDataChild form using the parent forms OpenModalForm method. I want to pass an object created in the parent for the child to use.
My calling code looks like this:
WITH Thisform
	loReport = .CrystalReports.OpenReport(.cReport)
	.openmodalchild('frmCrystalViewer',loReport)
Endwith
The init of the child form already has a lparameter statement with oCaller.
When I add oReport in the hope that this will receive the object it evaluates to .F. I have a feeling that it is my understanding of parameters that is faulty here.

>Hi Mike:
>
>>The OpenModalForm passes additional parameters by reference to the init of the child form. What does the code look like to receive those parameters?
>
>The first argument is the class name or the form name you actually want to open. The second and subsequent arguments are passed to the form or class Init method (as specified in the first argument). So ...
>
>
>cmStateManager.OpenModalForm('MyForm.scx', 'Hello', 'World')
>
>
>Then, in MyForm.scx ...
>
>
>Function Myform.Init(tcParm1, tcParm2)
>   *-- Do what you want with the parameters.
>   this.cMsg1 = m.tcParm1   && Receives "Hello"
>   this.cMsg2 = m.tcParm2   && Receives "World"
>Endfunc
>
>
>HTH
>
>Best
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform